예제 #1
0
 private void ShowInfo(decimal Lp_ID)
 {
     Maticsoft.BLL.Lapping_Receive   bll   = new Maticsoft.BLL.Lapping_Receive();
     Maticsoft.Model.Lapping_Receive model = bll.GetModel(Lp_ID);
     this.lblLp_ID.Text            = model.Lp_ID.ToString();
     this.txtCount.Text            = model.Count;
     this.txtReceiveUserID.Text    = model.ReceiveUserID;
     this.txtSendUserID.Text       = model.SendUserID;
     this.txtLappingReceiveID.Text = model.LappingReceiveID;
     this.txtDataTime.Text         = model.DataTime.ToString();
 }
예제 #2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtCount.Text.Trim().Length == 0)
            {
                strErr += "Count不能为空!\\n";
            }
            if (this.txtReceiveUserID.Text.Trim().Length == 0)
            {
                strErr += "ReceiveUserID不能为空!\\n";
            }
            if (this.txtSendUserID.Text.Trim().Length == 0)
            {
                strErr += "SendUserID不能为空!\\n";
            }
            if (this.txtLappingReceiveID.Text.Trim().Length == 0)
            {
                strErr += "LappingReceiveID不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtDataTime.Text))
            {
                strErr += "DataTime格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            decimal  Lp_ID            = decimal.Parse(this.lblLp_ID.Text);
            string   Count            = this.txtCount.Text;
            string   ReceiveUserID    = this.txtReceiveUserID.Text;
            string   SendUserID       = this.txtSendUserID.Text;
            string   LappingReceiveID = this.txtLappingReceiveID.Text;
            DateTime DataTime         = DateTime.Parse(this.txtDataTime.Text);


            Maticsoft.Model.Lapping_Receive model = new Maticsoft.Model.Lapping_Receive();
            model.Lp_ID            = Lp_ID;
            model.Count            = Count;
            model.ReceiveUserID    = ReceiveUserID;
            model.SendUserID       = SendUserID;
            model.LappingReceiveID = LappingReceiveID;
            model.DataTime         = DataTime;

            Maticsoft.BLL.Lapping_Receive bll = new Maticsoft.BLL.Lapping_Receive();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }