예제 #1
0
 private void GetProductStock(string ProductName)
 {
     BLSaleProductTransaction objcount = new BLSaleProductTransaction();
     DataTable ds = objcount.GetProductStock(ProductName);
     if (ds.Rows.Count != 0)
     {
         txtProductCount.Text = ds.Rows[0]["Quantity"].ToString();
     }
 }
예제 #2
0
 private void Usp_BindGridSaleProductTransaction()
 {
     DataTable dt = new DataTable();
     BLSaleProductTransaction objBL = new BLSaleProductTransaction();
     dt = objBL.BindFullGrid();
     if (dt.Rows.Count > 0)
     {
         dgvProducts.DataSource = dt;
         dgvProducts.Refresh();
         dgvProducts.Show();
     }
 }
예제 #3
0
 private void dgvProducts_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvProducts.SelectedRows.Count > 0)
     {
         cbProductName.Text = Convert.ToString(dgvProducts.SelectedRows[0].Cells[0].Value);
         string ProductName = cbProductName.Text;
         BLSaleProductTransaction objProduct = new BLSaleProductTransaction();
         DataTable dt = objProduct.GetID(ProductName);
         if (dt.Rows.Count != 0)
         {
             lblProductid.Text = dt.Rows[0]["ProductID"].ToString();
         }
         txtProductCount.Text = Convert.ToString(dgvProducts.SelectedRows[0].Cells[1].Value);
         txtProductSeleQty.Text = Convert.ToString(dgvProducts.SelectedRows[0].Cells[2].Value);
         txtsellingTo.Text = Convert.ToString(dgvProducts.SelectedRows[0].Cells[3].Value);
         //cbActive.Text = Convert.ToString(dgvProducts.SelectedRows[0].Cells[7].Value);
         btbSave.Text = "Update";
     }
 }