Ejemplo n.º 1
0
 private void ShowInfo(int comc_ID)
 {
     WalleProject.BLL.t_commoditycategory   bll   = new WalleProject.BLL.t_commoditycategory();
     WalleProject.Model.t_commoditycategory model = bll.GetModel(comc_ID);
     this.txtcomc_name.Text = model.comc_name;
     this.lblcomc_ID.Text   = model.comc_ID.ToString();
 }
Ejemplo n.º 2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

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

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string comc_name = this.txtcomc_name.Text;
            int    comc_ID   = int.Parse(this.lblcomc_ID.Text);


            WalleProject.Model.t_commoditycategory model = new WalleProject.Model.t_commoditycategory();
            model.comc_name = comc_name;
            model.comc_ID   = comc_ID;

            WalleProject.BLL.t_commoditycategory bll = new WalleProject.BLL.t_commoditycategory();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Ejemplo n.º 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

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

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string comc_name = this.txtcomc_name.Text;

            WalleProject.Model.t_commoditycategory model = new WalleProject.Model.t_commoditycategory();
            model.comc_name = comc_name;

            WalleProject.BLL.t_commoditycategory bll = new WalleProject.BLL.t_commoditycategory();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }