Exemple #1
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();
            }
        }
Exemple #2
0
        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();
        }