public FRM_Product()
        {
            InitializeComponent();
            try
            {
                #region Fill SearchEdit By Data :
                WareHouseManager wh = new WareHouseManager();

                HelperClass.FillSearchLookUpByData(DefPurchaseWareHouse, wh.CreateTable(), WareHouseManager.WareHouseDetails.WareHouseName.ToString(),
                                                   WareHouseManager.WareHouseDetails.WareHouseCode.ToString());

                HelperClass.FillSearchLookUpByData(DefSalesWareHouse, wh.CreateTable(), WareHouseManager.WareHouseDetails.WareHouseName.ToString(),
                                                   WareHouseManager.WareHouseDetails.WareHouseCode.ToString());

                UnitManager unit = new UnitManager();

                HelperClass.FillSearchLookUpByData(DefWareHouseUnit, unit.CreateTable(), UnitManager.UnitDetails.UnitName.ToString(),
                                                   UnitManager.UnitDetails.UnitCode.ToString());

                HelperClass.FillSearchLookUpByData(DefPurchaseUnit, unit.CreateTable(), UnitManager.UnitDetails.UnitName.ToString(),
                                                   UnitManager.UnitDetails.UnitCode.ToString());

                HelperClass.FillSearchLookUpByData(DefSalesUnit, unit.CreateTable(), UnitManager.UnitDetails.UnitName.ToString(),
                                                   UnitManager.UnitDetails.UnitCode.ToString());

                #region Product Types :
                DataTable PrTypes = new DataTable();
                PrTypes.Columns.Add("TypeName", typeof(string));
                PrTypes.Rows.Add(ProductManager.ProductType.RM.ToString());
                PrTypes.Rows.Add(ProductManager.ProductType.PKG.ToString());
                PrTypes.Rows.Add(ProductManager.ProductType.PACK.ToString());
                PrTypes.Rows.Add(ProductManager.ProductType.SFG.ToString());
                PrTypes.Rows.Add(ProductManager.ProductType.FG.ToString());
                PrTypes.Rows.Add(ProductManager.ProductType.Service.ToString());
                PrTypes.Rows.Add(ProductManager.ProductType.CoProduct.ToString());

                HelperClass.FillSearchLookUpByData(ProductType, PrTypes, "TypeName", "TypeName");
                #endregion

                HelperClass.FillSearchLookUpByData(PrGroup, new ProductGroupManager().CreateTable(), ProductGroupManager.GroupDetails.GroupName.ToString(),
                                                   ProductGroupManager.GroupDetails.GroupCode.ToString());
                #endregion
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 private void FRM_Unit_Load(object sender, EventArgs e)
 {
     try
     {
         CategorySearch.Properties.DataSource    = new UOMCategoryManager().CreateTable();
         CategorySearch.Properties.ValueMember   = UOMCategoryManager.UnitCategoryDetails.CatCode.ToString();
         CategorySearch.Properties.DisplayMember = UOMCategoryManager.UnitCategoryDetails.Category.ToString();
         UnitGrid.DataSource = unit.CreateTable();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }