Exemple #1
0
 private void ShowInfo()
 {
     Maticsoft.BLL.tb_UserLoginRecords   bll   = new Maticsoft.BLL.tb_UserLoginRecords();
     Maticsoft.Model.tb_UserLoginRecords model = bll.GetModel();
     this.lblUserID.Text   = model.UserID;
     this.lblAction.Text   = model.Action;
     this.lblDateTime.Text = model.DateTime;
     this.lblWorkType.Text = model.WorkType;
 }
Exemple #2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtUserID.Text.Trim().Length == 0)
            {
                strErr += "UserID不能为空!\\n";
            }
            if (this.txtAction.Text.Trim().Length == 0)
            {
                strErr += "Action不能为空!\\n";
            }
            if (this.txtDateTime.Text.Trim().Length == 0)
            {
                strErr += "DateTime不能为空!\\n";
            }
            if (this.txtWorkType.Text.Trim().Length == 0)
            {
                strErr += "WorkType不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string UserID   = this.txtUserID.Text;
            string Action   = this.txtAction.Text;
            string DateTime = this.txtDateTime.Text;
            string WorkType = this.txtWorkType.Text;


            Maticsoft.Model.tb_UserLoginRecords model = new Maticsoft.Model.tb_UserLoginRecords();
            model.UserID   = UserID;
            model.Action   = Action;
            model.DateTime = DateTime;
            model.WorkType = WorkType;

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