Example #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtActionName.Text == "")
            {
                strErr += "ActionName不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtActionTime.Text))
            {
                strErr += "ActionTime不是时间格式!\\n";
            }
            if (this.txtRemark.Text == "")
            {
                strErr += "Remark不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string   ActionName = this.txtActionName.Text;
            DateTime ActionTime = DateTime.Parse(this.txtActionTime.Text);
            string   Remark     = this.txtRemark.Text;

            NoName.NetShop.Model.UserActionLogModel model = new NoName.NetShop.Model.UserActionLogModel();
            model.ActionName = ActionName;
            model.ActionTime = ActionTime;
            model.Remark     = Remark;

            NoName.NetShop.BLL.UserActionLogModelBll bll = new NoName.NetShop.BLL.UserActionLogModelBll();
            bll.Add(model);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtActionName.Text =="")
            {
            strErr+="ActionName����Ϊ�գ�\\n";
            }
            if(!PageValidate.IsDateTime(txtActionTime.Text))
            {
            strErr+="ActionTime����ʱ���ʽ��\\n";
            }
            if(this.txtRemark.Text =="")
            {
            strErr+="Remark����Ϊ�գ�\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            string ActionName=this.txtActionName.Text;
            DateTime ActionTime=DateTime.Parse(this.txtActionTime.Text);
            string Remark=this.txtRemark.Text;

            NoName.NetShop.Model.UserActionLogModel model=new NoName.NetShop.Model.UserActionLogModel();
            model.ActionName=ActionName;
            model.ActionTime=ActionTime;
            model.Remark=Remark;

            NoName.NetShop.BLL.UserActionLogModelBll bll=new NoName.NetShop.BLL.UserActionLogModelBll();
            bll.Add(model);
        }
 private void ShowInfo(int UserId)
 {
     NoName.NetShop.BLL.UserActionLogModelBll bll   = new NoName.NetShop.BLL.UserActionLogModelBll();
     NoName.NetShop.Model.UserActionLogModel  model = bll.GetModel(UserId);
     this.lblActionName.Text = model.ActionName;
     this.lblActionTime.Text = model.ActionTime.ToString();
     this.lblRemark.Text     = model.Remark;
 }
 private void ShowInfo(int UserId)
 {
     NoName.NetShop.BLL.UserActionLogModelBll bll=new NoName.NetShop.BLL.UserActionLogModelBll();
     NoName.NetShop.Model.UserActionLogModel model=bll.GetModel(UserId);
     this.lblActionName.Text=model.ActionName;
     this.lblActionTime.Text=model.ActionTime.ToString();
     this.lblRemark.Text=model.Remark;
 }