国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

Websharp使用說明(3)

2024-07-21 02:17:17
字體:
來源:轉載
供稿:網友
  • 本文來源于網頁設計愛好者web開發社區http://www.html.org.cn收集整理,歡迎訪問。
  • 如果要表示一對多的對象結構,我們可以采用如下的方式(表明了一個入庫單的結構,這個入庫單包含了入庫單頭和相關明細):

    public class form : persistencecapable

    {

    private entitydata form;

    private formdetail formdetail;



    #region 構造函數

    public form() : this(true)

    {}



    public form(bool autoinit)

    {

    form=entityprototypemanager.getemptyentity("form");

    if(autoinit)

    form.newrecord("form");

    }



    public form(entitydata entity)

    {

    form=entity;

    }

    #endregion



    #region 屬性

    public string formid

    {

    get{return form["formid","form"].tostring();}

    set{form["formid","form"]=value;}

    }



    public datetime formtime

    {

    get{return form.getdatetime("formtime","form");}

    set{form["formtime","form"]=value;}

    }



    public formdetail formdetail

    {

    get

    {

    if(formdetail==null)

    {

    formdetail=new formdetail(form);

    }

    return formdetail;

    }

    }

    #endregion



    #region persistencecapable 成員



    public int objectcount

    {

    get

    {

    return form.entitycount;

    }

    }



    public entitydata entitydata

    {

    get

    {

    return form;

    }

    set

    {

    form=value;

    }

    }



    public bool next()

    {

    return form.next("form");

    }



    public void first()

    {

    form.first("form");

    }



    public void addnew()

    {

    form.newrecord("form");

    }



    #endregion

    }



    public class formdetail : persistencecapable

    {

    private entitydata form;

    #region 構造函數

    public formdetail() : this(true)

    {}



    public formdetail(bool autoinit)

    {

    form=entityprototypemanager.getemptyentity("form");

    if(autoinit)

    form.newrecord("formdetail");

    }



    public formdetail(entitydata entity)

    {

    form=entity;

    }

    #endregion



    #region 屬性

    public string formdetailid

    {

    get{return form["formdetailid","formdetail"].tostring();}

    set{form["formdetailid","formdetail"]=value;}

    }

    public string formid

    {

    get{return form["formid","formdetail"].tostring();}

    set{form["formid","formdetail"]=value;}

    }

    public string productid

    {

    get{return form["productid","formdetail"].tostring();}

    set{form["productid","formdetail"]=value;}

    }

    public decimal incount

    {

    get{return form.getdecimal("incount","formdetail");}

    set{form["incount","formdetail"]=value;}

    }

    #endregion



    #region persistencecapable 成員

    public int objectcount

    {

    get

    {

    return form.tables["formdetail"].rows.count;

    }

    }



    public entitydata entitydata

    {

    get

    {

    return form;

    }

    set

    {

    form=value;

    }

    }



    public bool next()

    {

    return form.next("formdetail");

    }



    public void first()

    {

    form.first("formdetail");

    }



    public void addnew()

    {

    form.newrecord("formdetail");

    }



    #endregion

    }

    發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 河南省| 皋兰县| 濮阳市| 东乌珠穆沁旗| 苗栗市| 靖西县| 济阳县| 城口县| 上饶县| 黄浦区| 韶关市| 山丹县| 大新县| 甘泉县| 荣成市| 亳州市| 沅江市| 吴忠市| 民乐县| 南开区| 木兰县| 西丰县| 武陟县| 阿荣旗| 沙河市| 南丹县| 杭锦旗| 南江县| 砀山县| 米泉市| 西宁市| 陆川县| 鄯善县| 荥经县| 赫章县| 陕西省| 西畴县| 翁源县| 临沭县| 中西区| 泗水县|