private void InitializaLOVData()
        {
            try
            {
                //For Warehouse
                using (MaterialBLL mtlBll = new MaterialBLL())
                {
                    List <Location> lstLoc = mtlBll.GetLocationList();
                    if (lstLoc != null)
                    {
                        this.grvQrySummary_rps_lueLocation.DataSource = lstLoc;

                        lstLoc.Insert(0, new Location {
                            SEQ_NO = string.Empty, NAME = "(All)"
                        });
                        this.lueLocation.Properties.DataSource = lstLoc;
                    }
                }

                //for party
                using (PartyBLL partyBll = new PartyBLL())
                {
                    List <Party> lstParty = partyBll.LovPratyList("V", string.Empty);
                    lstParty.Insert(0, new Party {
                        PARTY_ID = string.Empty, PARTY_NAME = "(All)"
                    });

                    this.lueCUSTOMER.Properties.DataSource = lstParty;
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
        private void InitializaLOVData()
        {
            try
            {
                //for warehouse
                //using (QueryBLL queryBll = new QueryBLL())
                //{
                //    List<Warehouse> lstWH = queryBll.GetWarehouse();
                //    if (lstWH != null)
                //    {
                //        lstWH.Insert(0, new Warehouse { SEQ_NO = string.Empty, NAME = "(All)" });
                //        this.lueWarehouse.Properties.DataSource = lstWH;
                //        this.rps_lueWH.DataSource = lstWH;
                //    }
                //}
                using (MaterialBLL mtlBll = new MaterialBLL())
                {
                    List <Location> lstLoc = mtlBll.GetLocationList();
                    if (lstLoc != null)
                    {
                        // this.grvQrySummary_rps_lueLocation.DataSource = lstLoc;

                        lstLoc.Insert(0, new Location {
                            SEQ_NO = string.Empty, NAME = "(All)"
                        });
                        this.lueWarehouse.Properties.DataSource = lstLoc;
                        this.rps_lueWH.DataSource = lstLoc;
                    }
                }


                //for ARR TYPE
                using (ArrivalBLL arrBll = new ArrivalBLL())
                {
                    List <M_ARRIVAL_TYPE> lstARR_TYPE = arrBll.GetArrivalTypeList();
                    if (lstARR_TYPE != null)
                    {
                        //  lstWH.Insert(0, new Warehouse { SEQ_NO = string.Empty, NAME = "(All)" });
                        //    this.lueWarehouse.Properties.DataSource = lstWH;
                        this.rps_lueARR_TYPE.DataSource = lstARR_TYPE;
                    }
                }

                //for party
                using (PartyBLL partyBll = new PartyBLL())
                {
                    List <Party> lstParty = partyBll.LovPratyList("V", string.Empty);
                    lstParty.Insert(0, new Party {
                        PARTY_ID = string.Empty, PARTY_NAME = "(All)"
                    });
                    this.lueCUSTOMER.Properties.DataSource = lstParty;
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
Esempio n. 3
0
        private void InitializaLOVData()
        {
            this._emptyImage = base.Language.GetBitmap("EmptyImage");

            try
            {
                using (MaterialBLL mtlBll = new MaterialBLL())
                {
                    //for Unit
                    List <Unit> lstUnit = mtlBll.GetUnitList();
                    if (lstUnit != null)
                    {
                        this.lueUNIT.Properties.DataSource = lstUnit;

                        if (lstUnit.Count > 0)
                        {
                            Unit unitTemp = lstUnit.Find(delegate(Unit _unit)
                            {
                                return(_unit.SEQ_NO == "KG");
                            });
                            if (unitTemp != null)
                            {
                                this.lueUNIT.EditValue = unitTemp.SEQ_NO;
                            }
                            else
                            {
                                //default
                                this.lueUNIT.EditValue = lstUnit[0].SEQ_NO;
                            }
                        }
                    }

                    //for Location
                    List <Location> lstLoc = mtlBll.GetLocationList();
                    if (lstLoc != null)
                    {
                        this.lueLOCATION_ID.Properties.DataSource     = lstLoc;
                        this.lueLocationUpload.Properties.DataSource  = lstLoc;
                        this.grvProduct_rps_lueLOCATION_ID.DataSource = lstLoc;
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }