コード例 #1
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private GBJCLR EntityGet()
        {
            GBJCLR entity = new GBJCLR();

            entity.ID = HTDataID;
            entity.SelectByID();
            entity.FormNo     = txtFormNo.Text.Trim();
            entity.FormDate   = DateTime.Now.Date;
            entity.Remark     = txtRemark.Text.Trim();
            entity.SaleOPID   = drpSaleOPID.EditValue.ToString();
            entity.VendorID   = drpVendorID.EditValue.ToString();
            entity.MakeOPID   = FParamConfig.LoginID;
            entity.MakeOPName = FParamConfig.LoginName;
            entity.MakeDate   = txtMakeDate.DateTime;
            if (this.HTFormStatus == FormStatus.新增) //新增两个挂板借出页面 配单据类型FormListID,zjh 2013.11.14
            {
                entity.FormListID = this.FormListAID;
            }
            return(entity);
        }
コード例 #2
0
        /// <summary>
        /// 设置
        /// </summary>
        public override void EntitySet()
        {
            GBJCLR entity = new GBJCLR();

            entity.ID = HTDataID;
            bool findFlag = entity.SelectByID();

            HTDataFormNo = entity.FormNo;

            txtFormNo.Text        = entity.FormNo.ToString();
            txtMakeDate.DateTime  = entity.MakeDate;
            drpSaleOPID.EditValue = entity.SaleOPID;
            drpVendorID.EditValue = entity.VendorID;
            txtRemark.Text        = entity.Remark.ToString();
            txtMakeOPName.Text    = entity.MakeOPName;
            HTDataSubmitFlag      = entity.SubmitFlag;
            HTDataDelFlag         = entity.DelFlag;
            if (!findFlag)
            {
            }
            BindGrid();
        }
コード例 #3
0
 private void frmGBJCLREdit_FormClosing_1(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (HTDataID > 0)
         {
             GBJCLR entity = new GBJCLR();
             entity.ID = HTDataID;
             entity.SelectByID();
             //if (entity.SubmitFlag == 0)
             //{
             //    if (DialogResult.Yes != ShowConfirmMessage(this.Text + Environment.NewLine + "没有提交单据,是否确认关闭窗体"))
             //  {
             //    e.Cancel = true;
             //  }
             //}
         }
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }