Exemplo n.º 1
0
        private void GetMTLTypeList(string findValue)
        {
            List <MaterialType> lstMTLtype = null;

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

                using (MaterialTypeBLL mtlTypeBll = new MaterialTypeBLL())
                {
                    lstMTLtype = mtlTypeBll.GetMTLTypeList(findValue);
                }

                this.grdMTLType.DataSource  = lstMTLtype;
                this.dntMaterial.DataSource = lstMTLtype;

                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;
            }
        }
Exemplo n.º 2
0
        public void GetMaterialtypeList()
        {
            List <MaterialType> lstMtlType = null;

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

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

                this.grdMaterial.DataSource = lstMtlType;
            }
            catch (Exception ex)
            {
                base.FinishedProcessing();
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                base.FinishedProcessing();
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 4
0
        public void GetMaterialtypeListSearchValue(string search)
        {
            List <MaterialType> lstMtlType = null;

            try
            {
                using (MaterialTypeBLL mtltypeBll = new MaterialTypeBLL())
                {
                    lstMtlType = mtltypeBll.GetMTLTypeList(search);
                }

                this.grdMaterial.DataSource = lstMtlType;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }