コード例 #1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtwasc_name.Text.Trim().Length == 0)
            {
                strErr += "wasc_name不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string wasc_name = this.txtwasc_name.Text;
            int    wasc_ID   = int.Parse(this.lblwasc_ID.Text);


            WalleProject.Model.t_wastecategory model = new WalleProject.Model.t_wastecategory();
            model.wasc_name = wasc_name;
            model.wasc_ID   = wasc_ID;

            WalleProject.BLL.t_wastecategory bll = new WalleProject.BLL.t_wastecategory();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
コード例 #2
0
 private void ShowInfo(int wasc_ID)
 {
     WalleProject.BLL.t_wastecategory   bll   = new WalleProject.BLL.t_wastecategory();
     WalleProject.Model.t_wastecategory model = bll.GetModel(wasc_ID);
     this.txtwasc_name.Text = model.wasc_name;
     this.lblwasc_ID.Text   = model.wasc_ID.ToString();
 }