Exemple #1
0
        private void InitializaLOVData()
        {
            try
            {
                //for post type
                using (InterfaceDataBLL inDataBll = new InterfaceDataBLL())
                {
                    List <PostType> lstPostType = inDataBll.PostTypeList();
                    if (lstPostType != null)
                    {
                        lstPostType.Insert(0, new PostType {
                            SEQ_NO = string.Empty, NAME = "(All)"
                        });
                        this.luePostType.Properties.DataSource = lstPostType;

                        //set defautl
                        this.luePostType.EditValue = "NEW";
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
        private void InitializaLOVData()
        {
            try
            {
                //for post type
                using (InterfaceDataBLL inDataBll = new InterfaceDataBLL())
                {
                    List <PostType> lstPostType = inDataBll.PostTypeList();
                    if (lstPostType != null)
                    {
                        lstPostType.Insert(0, new PostType {
                            SEQ_NO = string.Empty, NAME = "(All)"
                        });
                        this.luePostType.Properties.DataSource = lstPostType;

                        //set defautl
                        this.luePostType.EditValue = "NEW";
                    }

                    List <Warehouse> lstWH = inDataBll.GetWarehouse();
                    if (lstWH != null)
                    {
                        lstWH.Insert(0, new Warehouse {
                            SEQ_NO = string.Empty, NAME = "(All)"
                        });
                        this.lueWarehouse.Properties.DataSource = lstWH;
                    }
                }

                using (ProductionTypeBLL pdtBll = new ProductionTypeBLL())
                {
                    this.grvAsmIn_rps_PRODUCTION_TYPE.DataSource = pdtBll.GetProductionTypeList();
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }