Ejemplo n.º 1
0
 private void ShowInfo(string GID)
 {
     Cao.WMS.BLL.caowms.Goods   bll   = new Cao.WMS.BLL.caowms.Goods();
     Cao.WMS.Model.caowms.Goods model = bll.GetModel(GID);
     this.lblGID.Text       = model.GID;
     this.lblGName.Text     = model.GName;
     this.lblGPrice.Text    = model.GPrice.ToString();
     this.lblGProvider.Text = model.GProvider;
     this.lbln_bak.Text     = model.n_bak;
 }
Ejemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtGID.Text.Trim().Length == 0)
            {
                strErr += "GID不能为空!\\n";
            }
            if (this.txtGName.Text.Trim().Length == 0)
            {
                strErr += "SKU不能为空!\\n";
            }
            if (!PageValidate.IsDecimal(txtGPrice.Text))
            {
                strErr += "单价格式错误!\\n";
            }
            if (this.txtGProvider.Text.Trim().Length == 0)
            {
                strErr += "供应商不能为空!\\n";
            }
            if (this.txtn_bak.Text.Trim().Length == 0)
            {
                strErr += "n_bak不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string  GID       = this.txtGID.Text;
            string  GName     = this.txtGName.Text;
            decimal GPrice    = decimal.Parse(this.txtGPrice.Text);
            string  GProvider = this.txtGProvider.Text;
            string  n_bak     = this.txtn_bak.Text;

            Cao.WMS.Model.caowms.Goods model = new Cao.WMS.Model.caowms.Goods();
            model.GID       = GID;
            model.GName     = GName;
            model.GPrice    = GPrice;
            model.GProvider = GProvider;
            model.n_bak     = n_bak;

            Cao.WMS.BLL.caowms.Goods bll = new Cao.WMS.BLL.caowms.Goods();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 新增商品sku
        /// </summary>
        public void addGoods()
        {
            bool addGoods = true;

            Cao.WMS.BLL.caowms.Goods bllgoods = new Cao.WMS.BLL.caowms.Goods();
            addGoods = bllgoods.Exists(this.txtRGID.Text.Trim());
            if (!addGoods)
            {
                Cao.WMS.Model.caowms.Goods modelgoods = new Cao.WMS.Model.caowms.Goods();
                modelgoods.GID       = this.txtRGID.Text.Trim();
                modelgoods.GName     = "";
                modelgoods.GPrice    = 0;
                modelgoods.GProvider = "";
                modelgoods.n_bak     = "入库新增SKU";
                bllgoods.Add(modelgoods);
            }
        }