Ejemplo n.º 1
0
 /// <summary>
 /// Function to fill unit combobox
 /// </summary>
 public void UnitComboFill()
 {
     try
     {
         UnitSP spUnit = new UnitSP();
         DataTable dtblUnit = new DataTable();
         dtblUnit = spUnit.UnitViewAll();
         dgvcmbConsumptionunitId.DataSource = dtblUnit;
         dgvcmbConsumptionunitId.ValueMember = "unitId";
         dgvcmbConsumptionunitId.DisplayMember = "unitName";
         dgvcmbProductionunitId.DataSource = dtblUnit;
         dgvcmbProductionunitId.ValueMember = "unitId";
         dgvcmbProductionunitId.DisplayMember = "unitName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SJ:21" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Grid Unit combofill, all are the unit fill here
 /// </summary>
 public void DgvUnitComboFill()
 {
     try
     {
         UnitSP spUnit = new UnitSP();
         DataTable dtblUnit = new DataTable();
         dtblUnit = spUnit.UnitViewAll();
         dgvtxtSalesInvoicembUnitName.DataSource = dtblUnit;
         dgvtxtSalesInvoicembUnitName.ValueMember = "unitId";
         dgvtxtSalesInvoicembUnitName.DisplayMember = "unitName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SI: 24" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Unit combo fill
 /// </summary>
 public void DGVUnitComboFill()
 {
     try
     {
         UnitSP spUnit = new UnitSP();
         DataTable dtblUnit = new DataTable();
         dtblUnit = spUnit.UnitViewAll();
         dgvcmbUnit.DataSource = dtblUnit;
         DataRow dr = dtblUnit.NewRow();
         dr[2] = "NA";
         dtblUnit.Rows.InsertAt(dr, 0);
         dgvcmbUnit.ValueMember = "unitId";
         dgvcmbUnit.DisplayMember = "unitName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("SQ:07" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Function to fill unit combobox in grid
 /// </summary>
 public void UnitComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         UnitSP spUnit = new UnitSP();
         dtbl = spUnit.UnitViewAll();
         cmbUnit.DataSource = dtbl;
         cmbUnit.DisplayMember = "unitName";
         cmbUnit.ValueMember = "unitId";
         cmbUnit.SelectedValue = -1;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PC:52" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Function to fill DataGridView Unit combobox 
 /// </summary>
 public void DGVUnitComboFill()
 {
     TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
     try
     {
         UnitSP spUnit = new UnitSP();
         DataTable dtblUnit = new DataTable();
         dtblUnit = spUnit.UnitViewAll();
         dgvcmbUnit.DataSource = dtblUnit;
         dgvcmbUnit.ValueMember = "unitId";
         dgvcmbUnit.DisplayMember = "unitName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PR:07" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }