예제 #1
0
 private void FillProductGroupCBX()
 {
     try
     {
         this.cbx_ProductGroup.SelectedIndexChanged -= new System.EventHandler(this.cbx_ProductGroup_SelectedIndexChanged);
         cbx_ProductGroup.DataSource                 = _bDProductGroupWrapper.SelectAll();
         cbx_ProductGroup.DisplayMember              = "ProductGroupName";
         cbx_ProductGroup.ValueMember                = "ProductGroupID";
         this.cbx_ProductGroup.SelectedIndexChanged += new System.EventHandler(this.cbx_ProductGroup_SelectedIndexChanged);
         cbx_ProductGroup.SelectedIndex              = -1;
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #2
0
 private void FillProductGroupCBX()
 {
     try
     {
         this.cbx_ProductGroup.SelectedIndexChanged -= new System.EventHandler(this.cbx_ProductGroup_SelectedIndexChanged);
         cbx_ProductGroup.DataSource                 = _bDProductGroupWrapper.SelectAll();
         cbx_ProductGroup.DisplayMember              = "ProductGroupName";
         cbx_ProductGroup.ValueMember                = "ProductGroupID";
         this.cbx_ProductGroup.SelectedIndexChanged += new System.EventHandler(this.cbx_ProductGroup_SelectedIndexChanged);
         cbx_ProductGroup.SelectedIndex              = -1;
     }
     catch (Exception ex)
     {
         MessageBox.Show("حدث خطأ برجاء تكرار العمليه مره اخرى واذا تكرر الخطا برجاءالاتصال بالشخص المصمم للبرنامج وارسال رسالة الخطا التى ستظهر بعد قليل له");
         MessageBox.Show(ex.Message);
     }
 }
예제 #3
0
        public void InitiateGrid()
        {
            dgrid_Result.Columns.Clear();

            dgrid_Result.AutoGenerateColumns = false;

            dgrid_Result.Height = 150;

            dgrid_Result.Size = new Size(10, 250);

            List <BDProductGroup> ProductGroup = _bdProductGroupWrapper.SelectAll();

            dgrid_Result.DataSource = ProductGroup;

            addColumnToGrid("ProductGroupID", "ProductGroupID", 120, false);
            addColumnToGrid("إسم المجموعة", "ProductGroupName", 120, true);
        }
예제 #4
0
 private void loadResourcses()
 {
     ddl_ProductGroupID.DataSource    = _bdProductGroupWrapper.SelectAll();
     ddl_ProductGroupID.DisplayMember = "ProductGroupName";
     ddl_ProductGroupID.ValueMember   = "ProductGroupID";
 }