Ejemplo n.º 1
0
 /// <summary>
 /// Function to fill the barnd combobox
 /// </summary>
 public void BrandComboFill()
 {
     try
     {
         DataTable dtbl    = new DataTable();
         BrandSP   spBrand = new BrandSP();
         dtbl = spBrand.BrandViewAll();
         DataRow dr = dtbl.NewRow();
         dr["brandName"] = "All";
         dr["brandId"]   = 0;
         dtbl.Rows.InsertAt(dr, 0);
         cmbBrand.DataSource    = dtbl;
         cmbBrand.DisplayMember = "brandName";
         cmbBrand.ValueMember   = "brandId";
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SER3:" + ex.Message;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function to fill Brand combobox
 /// </summary>
 public void BrandComboFill()
 {
     try
     {
         DataTable dtbl    = new DataTable();
         BrandSP   spBrand = new BrandSP();
         dtbl = spBrand.BrandViewAll();
         DataRow dr = dtbl.NewRow();
         dr["brandName"] = "All";
         dr["brandId"]   = 0;
         dtbl.Rows.InsertAt(dr, 0);
         cmbBrand.DataSource    = dtbl;
         cmbBrand.DisplayMember = "brandName";
         cmbBrand.ValueMember   = "brandId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SE:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Function to fill Brand combobox
 /// </summary>
 public void BrandComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         BrandSP spBrand = new BrandSP();
         dtbl = spBrand.BrandViewAll();
         DataRow dr = dtbl.NewRow();
         dr["brandName"] = "All";
         dr["brandId"] = 0;
         dtbl.Rows.InsertAt(dr, 0);
         cmbBrand.DataSource = dtbl;
         cmbBrand.DisplayMember = "brandName";
         cmbBrand.ValueMember = "brandId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SE:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 4
0
        //-------------------------------------------------------------BrandComboFill---------------------------
        public void BrandComboFill()
        {
            try
            {
                DataTable dtbl = new DataTable();
                BrandSP spBrand = new BrandSP();
                dtbl = spBrand.BrandViewAll();
                cmbBrand.DataSource = dtbl;
                cmbBrand.DisplayMember = "brandName";
                cmbBrand.ValueMember = "brandId";
                cmbBrand.SelectedValue = 1;
            }
            catch (Exception ex)
            {
                MessageBox.Show("PC:46" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }
 /// <summary>
 /// Function to fill Brand combobox
 /// </summary>
 public void BrandComboFill()
 {
     try
     {
         BrandSP spBrand = new BrandSP();
         dtblBrand = spBrand.BrandViewAll();
         dgvcmbBrand.DataSource = dtblBrand;
         dgvcmbBrand.ValueMember = "brandId";
         dgvcmbBrand.DisplayMember = "brandName";
         SettingsSP spSettings = new SettingsSP();
         if (spSettings.SettingsStatusCheck("ShowBrand") == "Yes")
         {
             dgvcmbBrand.ReadOnly = false;
         }
         else
         {
             dgvcmbBrand.ReadOnly = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MPC6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }