示例#1
0
        private void Related()
        {
            DialogResult yn = oFrm.ShowDialog();

            if (yn == DialogResult.OK)
            {
                this.DROP_CUSTID.SetValue(oFrm.ds.Tables[0].Rows[0]["CUSTID"]);
                this.DROP_INVCUSTID.SetValue(oFrm.ds.Tables[0].Rows[0]["INVCUSTID"]);
                this.DROP_SALEREP.SetValue(oFrm.ds.Tables[0].Rows[0]["SALESMAN"]);
                SM_XSKP xskp = this.editData as SM_XSKP;
                xskp.XSKPDTL.Clear();
                foreach (DataRow dr in oFrm.ds.Tables[0].Select("ISSELECT=1"))
                {
                    SM_XSKPDTL xskpdtl = new SM_XSKPDTL();
                    xskpdtl.ORDERID        = G.Core.GConvert.ToString(dr["ORDERID"]);
                    xskpdtl.ITEMCODE       = G.Core.GConvert.ToString(dr["ITEMCODE"]);
                    xskpdtl.ITEMNAME       = G.Core.GConvert.ToString(dr["ITEMNAME"]);
                    xskpdtl.JLDW           = G.Core.GConvert.ToString(dr["JLDW"]);
                    xskpdtl.QTY            = G.Core.GConvert.ToDecimal(dr["QTY"]);
                    xskpdtl.ATPRICE        = G.Core.GConvert.ToDecimal(dr["ATPRICE"]);
                    xskpdtl.ATMONEY        = G.Core.GConvert.ToDecimal(dr["ATMONEY"]);
                    xskpdtl.OTPRICE        = G.Core.GConvert.ToDecimal(dr["OTPRICE"]);
                    xskpdtl.OTMONEY        = G.Core.GConvert.ToDecimal(dr["OTMONEY"]);
                    xskpdtl.TAXMONEY       = G.Core.GConvert.ToDecimal(dr["TAXMONEY"]);
                    xskpdtl.SALEORDERDTLID = G.Core.GConvert.ToInt(dr["ID"]);
                    xskpdtl.TAXRATE        = 17;
                    xskp.XSKPDTL.Add(xskpdtl);
                }
                this.gGrid1.SetValue <SM_XSKPDTL>(xskp.XSKPDTL);
            }
            ExecuteSum();
            this.Refresh();
        }
示例#2
0
 private void Audit()
 {
     try
     {
         SM_XSKP xskp = this.editData as SM_XSKP;
         new G.BLL.ERP.AccRec.SM_XSKPLogic().Audit(G.AppInfo.GGlobal.User, xskp);
         MessageBox.Show("审核完成!");
         this.Close();
         //this.LoadData();
     }
     catch (Exception e) { MessageBox.Show(e.Message); }
 }
示例#3
0
        private void ExecuteSum()
        {
            SM_XSKP xskp   = this.editData as SM_XSKP;
            decimal sumqty = 0;
            decimal sumvat = 0;
            decimal sumvot = 0;
            decimal sumtax = 0;

            foreach (SM_XSKPDTL d in xskp.XSKPDTL)
            {
                sumqty += G.Core.GConvert.ToDecimal(d.QTY);
                sumvat += G.Core.GConvert.ToDecimal(d.ATMONEY);
                sumvot += G.Core.GConvert.ToDecimal(d.OTMONEY);
                sumtax += G.Core.GConvert.ToDecimal(d.TAXMONEY);
            }
            xskp.SUMQTY = Math.Round(sumqty, 2);
            xskp.SUMVAT = Math.Round(sumvat, 2);
            xskp.SUMVOT = Math.Round(sumvot, 2);
            xskp.SUMTAX = Math.Round(sumtax, 2);
            this.TXT_SUMQTY.SetValue(xskp.SUMQTY);
            this.TXT_SUMVAT.SetValue(xskp.SUMVAT);
            this.TXT_SUMVOT.SetValue(xskp.SUMVOT);
        }
示例#4
0
        private void Red()
        {
            SM_XSKP xskp = this.editData as SM_XSKP;

            ((SM_XSKPLogic)this.Logic).Red(G.AppInfo.GGlobal.User, xskp);
        }