Example #1
0
 private void ShowInfo(string shipNo, string orderNo)
 {
     BookShop.BLL.ShipSheet   bll   = new BookShop.BLL.ShipSheet();
     BookShop.Model.ShipSheet model = bll.GetModel(shipNo, orderNo);
     this.lblshipNo.Text    = model.shipNo;
     this.lblorderNo.Text   = model.orderNo;
     this.lblshipDate.Text  = model.shipDate.ToString();
     this.lblcompanyNo.Text = model.companyNo;
     this.lblinvoiceNo.Text = model.invoiceNo;
 }
Example #2
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 (!PageValidate.IsDateTime(txtshipDate.Text))
            {
                strErr += "shipDate格式错误!\\n";
            }
            if (this.txtcompanyNo.Text.Trim().Length == 0)
            {
                strErr += "companyNo不能为空!\\n";
            }
            if (this.txtinvoiceNo.Text.Trim().Length == 0)
            {
                strErr += "invoiceNo不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string   shipNo    = this.txtshipNo.Text;
            string   orderNo   = this.txtorderNo.Text;
            DateTime shipDate  = DateTime.Parse(this.txtshipDate.Text);
            string   companyNo = this.txtcompanyNo.Text;
            string   invoiceNo = this.txtinvoiceNo.Text;

            BookShop.Model.ShipSheet model = new BookShop.Model.ShipSheet();
            model.shipNo    = shipNo;
            model.orderNo   = orderNo;
            model.shipDate  = shipDate;
            model.companyNo = companyNo;
            model.invoiceNo = invoiceNo;

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