示例#1
0
文件: main.cs 项目: phiree/namename
        void pi_OnSelectPro(object sender, ProInfo proinfo)
        {
            //进行修改数量,与删除的操作
            uc.ucProInfo pi = (uc.ucProInfo)((Control)sender).Parent;
            Shop_SellDetail ssd = (Shop_SellDetail)(pi.Tag);

            decimal qty = new ProQtyInput().GetQty(proinfo, ssd.Amount, true, string.IsNullOrEmpty(selllist.BackBillNo));
            if (qty == 0)
            {
                return;
            }
            else if (qty == -1)
            {
                //删除操作
                if (!string.IsNullOrEmpty(selllist.BackBillNo))
                {
                    ReMoveDetails.Add(ssd);
                }
                selllist.Details.Remove(ssd);
                ShowSellDetailByPageNo(true);
            }
            else
            {
                ssd.Amount = qty;
                pi.RightField = "数量:" + qty.ToString("0.00");
                pi.LoadProInfo();
            }
            lbAmount.Text = GetSumAmount();
        }
示例#2
0
        void pi_OnSelectPro(object sender, ProInfo proinfo)
        {
            //显示输入产品数量的窗口
            uc.ucProInfo upi = (uc.ucProInfo)sender;
            Shop_AskData sad = (Shop_AskData)upi.Tag;

            decimal qty = new ProQtyInput().GetQty(proinfo, sad.Qty, true, true);
            if (qty == 0)
            {
                return;
            }
            else if (qty == -1)
            {
                sa.Remove(sad);
                new DALShopAskData().Delete(sad);
            }
            else
            {
                sad.Qty = qty;
                upi.RightField = "数量:" + qty.ToString("0.00");
                upi.LoadProInfo();
            }
        }
示例#3
0
 void pi_OnSelectPro(object sender, ProInfo proinfo)
 {
     this.Hide();
     //显示输入产品数量的窗口
     lbErrorInfo.Text = "";
     decimal qty = new ProQtyInput().GetQty(proinfo, 0, false);
     if (qty == 0)
     {
         this.Show();
         return;
     }
     else
     {
         if (OnProSelectQty != null)
         {
             if (!OnProSelectQty(proinfo, qty))
             {
                 lbErrorInfo.Text = "产品已经选择,不能重复选择";
                 this.Show();
             }
         }
     }
 }