private void gridView请购计划列表_RowCellClick(object sender, RowCellClickEventArgs e)
        {
            if (e.RowHandle > -1)
            {
                this.Cursor = Cursors.WaitCursor;
                string fid = gridView请购计划列表.GetRowCellValue(e.RowHandle, "FID").ToString();

                string fbrandname = gridView请购计划列表.GetRowCellValue(e.RowHandle, "FPREMISEBRANDNAME").ToString();

                string fbiller = gridView请购计划列表.GetRowCellValue(e.RowHandle, "FBILLERNAME").ToString();

                string fsalearea = gridView请购计划列表.GetRowCellValue(e.RowHandle, "FCLASSAREA2NAME").ToString();


                var list = _service.GetPurchasePlanEntryList(fid, null, true).ToList();
                list.RemoveAll(x => listEntryID.Contains(x.FID));

                foreach (var sub in list)
                {
                    sub.fbrandname = fbrandname;
                    sub.fbiller    = fbiller;
                    sub.fsalearea  = fsalearea;
                }


                gridControl请购计划明细.DataSource = list;

                V_ICPRBILLENTRYMODEL v = new V_ICPRBILLENTRYMODEL();


                this.Cursor = Cursors.Default;
            }

            //gridControl请购计划明细.DataSource = _service.GetPurchasePlanEntryList(fid);
        }
Ejemplo n.º 2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //gridView请购计划明细.CloseEditor();

            var list = gridView请购计划明细.DataSource as V_ICPRBILLENTRYMODEL[];

            int[] rownumber = this.gridView请购计划明细.GetSelectedRows();//获取选中行号;
            foreach (var i in rownumber)
            {
                V_ICPRBILLENTRYMODEL t  = list[i];
                V_ICPOBILLENTRYMODEL t1 = new V_ICPOBILLENTRYMODEL();
                t1.FMODEL       = t.FMODEL;
                t1.FPLANID      = t.FID;
                t1.FPRODUCTNAME = t.FPRODUCTNAME;
                t1.FPRODUCTTYPE = t.FPRODUCTTYPE;
                t1.FPRODUCTCODE = t.FPRODUCTCODE;
                t1.FUNITID      = t.FUNITID;
                t1.FUNITNAME    = t.FUNITNAME;
                t1.FSTATUS      = 1;
                t1.FSTATE       = 1;
                t1.FBATCHNO     = t.FBATCHNO;
                t1.FCOLORNO     = t.FCOLORNO;
                t1.FREMARK      = t.FREMARK;
                t1.FPRICE       = t.FWHOLESALEPRICE;
                t1.FADVQTY      = t.FADVQTY;
                t1.FASKQTY      = t.FASKQTY;
                t1.FSRCQTY      = t.FASKQTY;
                t1.FSRCCOST     = t.FASKAMOUNT;
                t1.FNEEDDATE    = t.FNEEDDATE;


                listCG.Add(t1);
            }


            gridControl采购订单列表.DataSource = listCG;
            gridControl采购订单列表.RefreshDataSource();
        }
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //gridView请购计划明细.CloseEditor();

            var list = gridView请购计划明细.DataSource as List <V_ICPRBILLENTRYMODEL>;

            if (list == null)
            {
                return;
            }
            int[] rownumber = this.gridView请购计划明细.GetSelectedRows();//获取选中行号;
            foreach (var i in rownumber)
            {
                V_ICPRBILLENTRYMODEL t = list[i];

                V_ICPOBILLENTRYMODEL sub = new V_ICPOBILLENTRYMODEL();
                sub.FITEMID      = t.FITEMID;
                sub.FPRODUCTNAME = t.FPRODUCTNAME;
                sub.FSRCQTY      = t.FORDERUNITQTY;
                sub.FADVQTY      = t.FADVQTY;
                sub.FREMARK      = t.FREMARK;
                sub.FPLANID      = t.FID;
                sub.FUNITID      = t.FUNITID;
                sub.FUNITNAME    = t.FUNITNAME;
                sub.FCOLORNO     = t.FCOLORNO;
                sub.FID          = t.FID;
                listCG.Add(sub);

                /*
                 * V_ICPOBILLENTRYMODEL t1 = new V_ICPOBILLENTRYMODEL();
                 * t1.FMODEL = t.FMODEL;
                 * t1.FPLANID =t.FID;
                 * t1.FPRODUCTNAME = t.FPRODUCTNAME;
                 * t1.FPRODUCTTYPE = t.FPRODUCTTYPE;
                 * t1.FPRODUCTCODE = t.FPRODUCTCODE;
                 * t1.FUNITID = t.FUNITID;
                 * t1.FUNITNAME = t.FUNITNAME;
                 * t1.FORDERUNIT = t.FORDERUNIT;
                 * t1.FSTATUS = 1;
                 * t1.FSTATE = 1;
                 *
                 * t1.FBATCHNO = t.FBATCHNO;
                 * t1.FCOLORNO = t.FCOLORNO;
                 * t1.FREMARK = t.FREMARK;
                 * t1.FPRICE = t.FWHOLESALEPRICE;
                 * t1.FADVQTY = t.FADVQTY;
                 * t1.FASKQTY = t.FASKQTY;
                 * t1.FSRCQTY = t.FASKQTY;
                 * t1.FSRCCOST = t.FASKAMOUNT;
                 * t1.FNEEDDATE = t.FNEEDDATE;
                 *
                 * t1.FITEMID = t.FITEMID;
                 * t1.FSRCCODE = t.FSRCCODE;
                 * t1.FSRCNAME = t.FSRCNAME;
                 * t1.FSRCMODEL = t.FSRCMODEL;
                 * t1.FstockNO = t.FSTOREHOUSE;
                 * t1.FCOLORNO = t.FCOLORNO;
                 * t1.FUNITID = t.FUNITID;
                 * t1.FPRICE = t.FWHOLESALEPRICE;
                 * t1.FREMARK = t.FREMARK;
                 *
                 * listCG.Add(t1);
                 */
            }
            if (this.showAfter != null)
            {
                if (listCG.Count > 0)
                {
                    if (this.showAfter != null)
                    {
                        showAfter(listCG);
                    }
                }
                this.Close();
            }
            else
            {
                this.DialogResult = DialogResult.OK;
            }

            //gridControl采购订单列表.DataSource = listCG;
            //gridControl采购订单列表.RefreshDataSource();
        }