Ejemplo n.º 1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txt评价字典内容.Text.Trim().Length==0)
            {
                strErr+="评价字典内容不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txt对应分值.Text))
            {
                strErr+="对应分值格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int 评价字典编号=int.Parse(this.lbl评价字典编号.Text);
            string 评价字典内容=this.txt评价字典内容.Text;
            int 对应分值=int.Parse(this.txt对应分值.Text);

            la.Model.comment_dic model=new la.Model.comment_dic();
            model.评价字典编号=评价字典编号;
            model.评价字典内容=评价字典内容;
            model.对应分值=对应分值;

            la.BLL.comment_dic bll=new la.BLL.comment_dic();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Ejemplo n.º 2
0
 private void ShowInfo(int 评价字典编号)
 {
     la.BLL.comment_dic bll=new la.BLL.comment_dic();
     la.Model.comment_dic model=bll.GetModel(评价字典编号);
     this.lbl评价字典编号.Text=model.评价字典编号.ToString();
     this.txt评价字典内容.Text=model.评价字典内容;
     this.txt对应分值.Text=model.对应分值.ToString();
 }