private void GetMachineList(string mcType)
        {
            List <Machine> lstMachine = null;

            try
            {
                base.ExecutionStart();
                base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data");

                using (MachineBLL mcBll = new MachineBLL())
                {
                    lstMachine = mcBll.GetMachineList(mcType);
                }

                this.grdMachine.DataSource = lstMachine;
                this.dntMachine.DataSource = lstMachine;

                this.chkSelect.ClearSelection();
                base.ExecutionStop();
            }
            catch (Exception ex)
            {
                base.FinishedProcessing();
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                base.FinishedProcessing();
                ((frmMainMenu)this.ParentForm).ExecuteTime.Caption = base.ExecuteTime;
            }
        }
        public void GetMachineList()
        {
            List <Machine> lstMc = null;

            try
            {
                base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data");

                using (MachineBLL mcBll = new MachineBLL())
                {
                    lstMc = mcBll.GetMachineList(string.Empty);
                }

                this.grdMachine.DataSource = lstMc;

                if (!string.IsNullOrEmpty(this._MACHINE_TYPE))
                {
                    this.grvMachine.ActiveFilterCriteria = (new OperandProperty("MACHINE_TYPE") == new OperandValue(this._MACHINE_TYPE));
                }
            }
            catch (Exception ex)
            {
                base.FinishedProcessing();
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                base.FinishedProcessing();
            }
        }
Beispiel #3
0
        private void InitializaLOVData()
        {
            this._emptyImage = base.Language.GetBitmap("EmptyImage");
            try
            {
                using (ProductBLL pdBll = new ProductBLL())
                {
                    List <Unit> lstUnit = pdBll.GetUnitList();
                    if (lstUnit != null)
                    {
                        this.lueUNIT.Properties.DataSource = lstUnit;
                        if (lstUnit.Count > 0)
                        {
                            Unit unitTemp = lstUnit.Find(delegate(Unit _unit)
                            {
                                return(_unit.SEQ_NO == "PCS");
                            });
                            if (unitTemp != null)
                            {
                                this.lueUNIT.EditValue = unitTemp.SEQ_NO;
                            }
                            else
                            {
                                //default
                                this.lueUNIT.EditValue = lstUnit[0].SEQ_NO;
                            }
                        }
                    }
                }
                using (MachineBLL mcBll = new MachineBLL())
                {
                    this.lstMachine = mcBll.GetMachineList(string.Empty);
                }

                using (ProductionTypeBLL pdtBll = new ProductionTypeBLL())
                {
                    this.lstProductionType = pdtBll.GetProductionTypeList();
                }

                using (MaterialTypeBLL mtltypeBll = new MaterialTypeBLL())
                {
                    this.lstMtlType = mtltypeBll.GetMTLTypeList(string.Empty);
                }

                this.grvProduct_rps_lueMACHINE.DataSource         = this.lstMachine;
                this.grvProduct_rps_lueMATERIAL_TYPE.DataSource   = this.lstMtlType;
                this.grvProduct_rps_luePRODUCTION_TYPE.DataSource = this.lstProductionType;
                this.luePRODUCTION_TYPE.Properties.DataSource     = this.lstProductionType;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
 private void InitializaLOVData()
 {
     try
     {
         using (MachineBLL mcBll = new MachineBLL())
         {
             List <Machine> lstMachine = mcBll.GetMachineList(string.Empty);
             lstMachine.Insert(0, new Machine {
                 MC_NO = string.Empty, MACHINE_NAME = "(All)"
             });
             this.lueMC_NO.Properties.DataSource = lstMachine;
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
     }
 }
        public void GetMachineListSearchValue(string search)
        {
            List <Machine> lstMc = null;

            try
            {
                using (MachineBLL mcBll = new MachineBLL())
                {
                    lstMc = mcBll.GetMachineList(search);
                }

                this.grdMachine.DataSource = lstMc;

                if (!string.IsNullOrEmpty(this._MACHINE_TYPE))
                {
                    this.grvMachine.ActiveFilterCriteria = (new OperandProperty("MACHINE_TYPE") == new OperandValue(this._MACHINE_TYPE));
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
Beispiel #6
0
        private void InitializaLOVData()
        {
            try
            {
                using (ProductionTypeBLL pdtBll = new ProductionTypeBLL())
                {
                    List <ProductionType> lstProdType = pdtBll.GetProductionTypeList();
                    lstProdType.Insert(0, new ProductionType {
                        SEQ_NO = string.Empty, NAME = "(All)"
                    });
                    this.luePRODUCTION_TYPE.Properties.DataSource = lstProdType;
                }

                using (MachineBLL mcBll = new MachineBLL())
                {
                    List <Machine> lstMachine = mcBll.GetMachineList(string.Empty);
                    lstMachine.Insert(0, new Machine {
                        MC_NO = string.Empty, MACHINE_NAME = "(All)"
                    });
                    this.lueMC_NO.Properties.DataSource = lstMachine;
                }

                using (PartyBLL partyBll = new PartyBLL())
                {
                    List <Party> lstParty = partyBll.LovPratyList("C", 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);
            }
        }