Ejemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtshipNo.Text.Trim().Length == 0)
            {
                strErr += "shipNo不能为空!\\n";
            }
            if (this.txtorderNo.Text.Trim().Length == 0)
            {
                strErr += "orderNo不能为空!\\n";
            }
            if (this.txtISBN.Text.Trim().Length == 0)
            {
                strErr += "ISBN不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string shipNo  = this.txtshipNo.Text;
            string orderNo = this.txtorderNo.Text;
            string ISBN    = this.txtISBN.Text;

            BookShop.Model.Ship model = new BookShop.Model.Ship();
            model.shipNo  = shipNo;
            model.orderNo = orderNo;
            model.ISBN    = ISBN;

            BookShop.BLL.Ship bll = new BookShop.BLL.Ship();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Ejemplo n.º 2
0
 private void ShowInfo(string shipNo, string orderNo, string ISBN)
 {
     BookShop.BLL.Ship   bll   = new BookShop.BLL.Ship();
     BookShop.Model.Ship model = bll.GetModel(shipNo, orderNo, ISBN);
     this.lblshipNo.Text  = model.shipNo;
     this.lblorderNo.Text = model.orderNo;
     this.lblISBN.Text    = model.ISBN;
 }
Ejemplo n.º 3
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string shipNo  = this.lblshipNo.Text;
            string orderNo = this.lblorderNo.Text;
            string ISBN    = this.lblISBN.Text;


            BookShop.Model.Ship model = new BookShop.Model.Ship();
            model.shipNo  = shipNo;
            model.orderNo = orderNo;
            model.ISBN    = ISBN;

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