Exemplo n.º 1
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void gridfill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         dtbl = spPhysicalStockMaster.PhysicalStockRegisterGridFill(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim());
         dgvPhysicalStockRegister.DataSource = dtbl;
         if (dgvPhysicalStockRegister.Columns.Count > 0)
         {
             dgvPhysicalStockRegister.Columns["dgvtxtAmount"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PSR2:" + ex.Message;
     }
 }
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void gridfill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         dtbl = spPhysicalStockMaster.PhysicalStockRegisterGridFill(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim());
         dgvPhysicalStockRegister.DataSource = dtbl;
         if (dgvPhysicalStockRegister.Columns.Count > 0)
         {
             dgvPhysicalStockRegister.Columns["dgvtxtAmount"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PSR:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }