Esempio n. 1
0
        public void InStorage()
        {
            DataRow drow = this.GetCurSelect();

            if (drow == null)
            {
                return;
            }
            SM_SHOPINEDIT oFrm = new SM_SHOPINEDIT();

            G.BLL.ERP.BaseData.DM_ITEMLogic itemlogic = new G.BLL.ERP.BaseData.DM_ITEMLogic();
            DM_ITEM   itemobj = itemlogic.ExecuteSelect(CK.K["ITEMCODE"].Eq(drow["ITEMCODE"]), OrderBy.Parse("ITEMCODE"), 0, 0)[0];
            SM_SHOPIN shopin  = new SM_SHOPIN();

            shopin.ITEMCODE    = G.Core.GConvert.ToString(drow["ITEMCODE"]);
            shopin.ITEMNAME    = G.Core.GConvert.ToString(drow["ITEMNAME"]);
            shopin.INVUNIT     = itemobj.InvUnit;
            shopin.ATTRIBUTEA  = G.Core.GConvert.ToString(drow["ATTRIBUTEA"]);
            shopin.ATTRIBUTEB  = G.Core.GConvert.ToString(drow["ATTRIBUTEB"]);
            shopin.ATTRIBUTEC  = G.Core.GConvert.ToInt(drow["ATTRIBUTEC"]);
            shopin.INQTY       = G.Core.GConvert.ToInt(drow["UNFINQTY"]);
            shopin.SHOPORDERID = G.Core.GConvert.ToString(drow["SHOPORDID"]);
            shopin.STATUS      = "N";
            shopin.STATUSNAME  = "新增";
            oFrm.SetData(shopin);
            oFrm.ShowDialog();
            this.RefreshData();
        }
Esempio n. 2
0
 private void DROP_POID_RowSelect(object sender, Interface.Event.DataRowEvent e)
 {
     if (e.DataRow != null)
     {
         try
         {
             this.DROP_SUPCODE.Text  = G.Core.GConvert.ToString(e.DataRow["SUPPNAME"]);
             this.DROP_SUPCODE.Value = G.Core.GConvert.ToString(e.DataRow["SUPCODE"]);
             string poid = G.Core.GConvert.ToString(e.DataRow["POID"]);
             G.BLL.ERP.Purchase.SM_PORDERLogic porderlogic = new G.BLL.ERP.Purchase.SM_PORDERLogic();
             SM_PORDER pobj = porderlogic.ExecuteSelect(CK.K["POID"].Eq(poid), OrderBy.Parse("POID"), 0, 0)[0];
             if (pobj != null)
             {
                 //SM_SHIPVOUCHER shipv = this.editData as SM_SHIPVOUCHER;
                 //shipv.SHIPVOUCHERDTL.Clear();
                 BindingList <SM_SHIPVOUCHERDTL> shipvd = this.gGrid1.DataSource as BindingList <SM_SHIPVOUCHERDTL>;
                 shipvd.Clear();
                 foreach (SM_PORDERDTL r in pobj.PORDERDTL)
                 {
                     if (r.PREPURQTY > r.SHIFTQTY)
                     {
                         G.BLL.ERP.BaseData.DM_ITEMLogic itemlogic = new G.BLL.ERP.BaseData.DM_ITEMLogic();
                         DM_ITEM           itemobj = itemlogic.ExecuteSelect(CK.K["ITEMCODE"].Eq(r.ITEMCODE), OrderBy.Parse("ITEMCODE"), 0, 0)[0];
                         SM_SHIPVOUCHERDTL shipd   = new SM_SHIPVOUCHERDTL();
                         shipd.POLNNO         = r.POLNNO;
                         shipd.ITEMCODE       = r.ITEMCODE;
                         shipd.ITEMNAME       = r.ITEMNAME;
                         shipd.INVUNIT        = r.INVUNIT;
                         shipd.PREPURQTY      = r.PREPURQTY;
                         shipd.PRICE          = r.PURPRICE;
                         shipd.ATTRIBUTEA     = r.ATTRIBUTEA;
                         shipd.ATTRIBUTEB     = r.ATTRIBUTEB;
                         shipd.ATTRIBUTEBNAME = r.ATTRIBUTEBNAME;
                         shipd.ATTRIBUTEC     = r.ATTRIBUTEC;
                         shipd.WRHSCODE       = itemobj.WrhsCode;
                         shipd.WRHSNAME       = itemobj.WRHSNAME;
                         shipd.LOCCODE        = itemobj.LocCode;
                         shipd.LOCNAME        = itemobj.LOCNAME;
                         shipd.UNFINISHQTY    = r.PREPURQTY - r.SHIFTQTY;
                         shipd.ISATTRIBUTEA   = (bool)itemobj.IsAttributeA;
                         shipd.ISATTRIBUTEB   = (bool)itemobj.IsAttributeB;
                         shipd.ISATTRIBUTEC   = (bool)itemobj.IsAttributeC;
                         shipvd.Add(shipd);
                     }
                 }
             }
         }
         catch (Exception ex) { MessageBox.Show(ex.Message); }
     }
     gGrid1.Refresh();
 }
Esempio n. 3
0
 private void InitDrop()
 {
     G.BLL.Sys.ND_UserLogic userlogic = new G.BLL.Sys.ND_UserLogic();
     G.BLL.ERP.BaseData.DM_SUPPLIERLogic supplierlogic = new G.BLL.ERP.BaseData.DM_SUPPLIERLogic();
     G.BLL.ERP.BaseData.DM_ITEMLogic     itemlogic     = new G.BLL.ERP.BaseData.DM_ITEMLogic();
     G.BLL.ERP.BaseData.DM_COLORLogic    colorlogic    = new G.BLL.ERP.BaseData.DM_COLORLogic();
     G.BLL.ERP.BaseData.DM_MOULDLogic    mouldlogic    = new G.BLL.ERP.BaseData.DM_MOULDLogic();
     G.BLL.Sys.ND_ORGINAZITIONLogic      orglogic      = new G.BLL.Sys.ND_ORGINAZITIONLogic();
     Initialize.InitDropDown(DROP_APPLYUSER, "USER", userlogic, true);
     Initialize.InitDropDown(DROP_PURUSER, "USER", userlogic, true);
     Initialize.InitDropDown(DROP_SUPCODE, "SUPPLIER", supplierlogic, true);
     DROP_ITEMCODE.CustomerDropDownForm = new G.Erp.BaseData.ItemSearch();
     Initialize.InitDropDown(DROP_ITEMCODE, "ITEM", itemlogic, true);
     Initialize.InitDropDown(DROP_ATTRIBUTEA, "COLORNAME", colorlogic, true);
     DROP_ATTRIBUTEB.CustomerDropDownForm = new G.Erp.BaseData.MouldSearch();
     Initialize.InitDropDown(DROP_ATTRIBUTEB, "MOULD", mouldlogic, true);
     Initialize.InitDropDown(DROP_DEPCODE, "ORG", orglogic, true);
 }
Esempio n. 4
0
 private void InitDrop()
 {
     G.BLL.Sys.ND_UserLogic               userlogic  = new G.BLL.Sys.ND_UserLogic();
     G.BLL.ERP.BaseData.DM_ITEMLogic      itemlogic  = new G.BLL.ERP.BaseData.DM_ITEMLogic();
     G.BLL.ERP.BaseData.DM_COLORLogic     colorlogic = new G.BLL.ERP.BaseData.DM_COLORLogic();
     G.BLL.ERP.BaseData.DM_MOULDLogic     mouldlogic = new G.BLL.ERP.BaseData.DM_MOULDLogic();
     G.BLL.Sys.ND_ORGINAZITIONLogic       orglogic   = new G.BLL.Sys.ND_ORGINAZITIONLogic();
     G.BLL.ERP.BaseData.DM_WAREHOUSELogic warelogic  = new G.BLL.ERP.BaseData.DM_WAREHOUSELogic();
     G.BLL.ERP.BaseData.DM_LOCATIONLogic  loclogic   = new G.BLL.ERP.BaseData.DM_LOCATIONLogic();
     DROP_ITEMCODE.RowSelect += DROP_ITEMCODE_RowSelect;
     Initialize.InitDropDown(DROP_AUDITOR, "USER", userlogic, true);
     DROP_ITEMCODE.CustomerDropDownForm = new G.Erp.BaseData.ItemSearch();
     Initialize.InitDropDown(DROP_ITEMCODE, "ITEM", itemlogic, true);
     Initialize.InitDropDown(DROP_ATTRIBUTEA, "COLORNAME", colorlogic, true);
     Initialize.InitDropDown(DROP_ATTRIBUTEB, "MOULD", mouldlogic, true);
     Initialize.InitDropDown(DROP_WORKSHOP, "ORG", orglogic, true);
     Initialize.InitDropDown(DROP_WRHSCODE, "WAREHOUSE", warelogic, true);
     Initialize.InitDropDown(DROP_LOCCODE, "LOCATION", loclogic, true);
 }