Esempio n. 1
0
 // 根据主键ID返回指定的MeiTan实体
 public static MeiTanBusEntity GetEntity(int ID)
 {
     MeiTanByPK exec = new MeiTanByPK();
     exec.ID = ID;
     MeiTanBusEntity obj = new MeiTanBusEntity();
     obj.MetaDataTable = exec.ExecDataTable();
     return obj;
 }
Esempio n. 2
0
    private void InitData(int id)
    {
        BusEntity.MeiTanBusEntity obj = BusFacade.MeiTanBusFacade.GetEntity(id);

        lblGongXu.Text          = obj.GongXu;
        lblFaBuRiQi.Text        = obj.FaBuRiQi.ToString("yyyy-MM-dd") == "1900-01-01" ? "----" : obj.FaBuRiQi.ToString("yyyy-MM-dd");
        lblXinXiYouXiaoQi.Text  = obj.XinXiYouXiaoQi.ToString("yyyy-MM-dd") == "1900-01-01" ? "----" : obj.XinXiYouXiaoQi.ToString("yyyy-MM-dd");
        lblMeiZhong.Text        = obj.MeiZhong;
        lblPinZhong.Text        = obj.PinZhong;
        lblTHSheng.Text         = obj.THSheng;
        lblTHShi.Text           = obj.THShi;
        lblJHSheng.Text         = obj.JHSheng;
        lblJHShi.Text           = obj.JHShi;
        lblShuLiang.Text        = obj.ShuLiang.ToString();
        lblJiaGe.Text           = obj.JiaGe.ToString();
        lblBaoJiaFangShi.Text   = obj.BaoJiaFangShi;
        lblJieSuanFangShi.Text  = obj.JieSuanFangShi;
        lblFaReLiang.Text       = obj.FaReLiang.ToString();
        lblLiDu.Text            = obj.LiDu.ToString();
        lblHanLiuLiang.Text     = obj.HanLiuLiang.ToString();
        lblHuiFen.Text          = obj.HuiFen.ToString();
        lblShuiFen.Text         = obj.ShuiFen.ToString();
        lblHuiFa.Text           = obj.HuiFa.ToString();
        lblGuDingTan.Text       = obj.GuDingTan.ToString();
        lblJiXieQiangDu.Text    = obj.JiXieQiangDu.ToString();
        lblGuiGe.Text           = obj.GuiGe.ToString();
        lblKangSuiQiangDu.Text  = obj.KangSuiQiangDu.ToString();
        lblLaiMoQianDu.Text     = obj.LaiMoQianDu.ToString();
        lblFanYingXing.Text     = obj.FanYingXing.ToString();
        lblQiKongLv.Text        = obj.QiKongLv.ToString();
        lblJiaoMoHanLiang.Text  = obj.JiaoMoHanLiang.ToString();
        lblLianJieZhiShu.Text   = obj.LianJieZhiShu.ToString();
        lblReWenDingXing.Text   = obj.ReWenDingXing.ToString();
        lblHuiRongRongXing.Text = obj.HuiRongRongXing.ToString();
        lblKeMoXing.Text        = obj.KeMoXing.ToString();
        lblXiangXiLeiRong.Text  = obj.XiangXiLeiRong;
        lblIsTiGongYunShu.Text  = obj.IsTiGongYunShu;
        lblYunshuFangShi.Text   = obj.YunshuFangShi;
        lblYunShuShuoMing.Text  = obj.YunShuShuoMing;
        lblDianJiLiang.Text     = obj.DianJiLiang.ToString();
        lblLianXiRen.Text       = obj.LianXiRen;
        lblPhone.Text           = obj.Phone;
        lblMail.Text            = obj.Mail;
        lblFax.Text             = obj.Fax;
        lblMobile.Text          = obj.Mobile;
        lblProvince.Text        = obj.Province;
        lblCity.Text            = obj.City;
        lblAddress.Text         = obj.Address;
        lblPostCode.Text        = obj.PostCode;
        AddClick(id);
    }
Esempio n. 3
0
 // 公用静态方法,插入一条记录 InsertMeiTan
 public static bool InsertEntity(MeiTanBusEntity obj)
 {
     MeiTanInsert exec = new MeiTanInsert();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Esempio n. 4
0
 // 公用静态方法,修改一条记录 UpdateMeiTan
 public static bool UpdateEntity(MeiTanBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     MeiTanUpdate exec = new MeiTanUpdate();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Esempio n. 5
0
 // 修改由实体指定的一条记录 ModifyMeiTan
 public bool Modify(MeiTanBusEntity obj)
 {
     return UpdateEntity(obj);
 }
Esempio n. 6
0
 // 添加由实体指定的一条记录 AddMeiTan
 public bool Add(MeiTanBusEntity obj)
 {
     return InsertEntity(obj);
 }