private void Usp_BindSellTransactionGrid() { DataTable dt = null; BLSaleTransaction objBL = new BLSaleTransaction(); dt = objBL.BindFullGrid(); if (dt.Rows.Count > 0) { dgvSellTransaction.DataSource = dt; dgvSellTransaction.Refresh(); dgvSellTransaction.Show(); } }
private void Usp_BindSellTransactionGrid(int SaleTransactionID) { DataTable dt = new DataTable(); BLSaleTransaction objBL = new BLSaleTransaction(); dt = objBL.BindFullGrid(SaleTransactionID); if (dt.Rows.Count > 0) { dgvSellTransaction.DataSource = dt; dgvSellTransaction.Refresh(); dgvSellTransaction.Show(); dgvSellTransaction.Columns["ProductID"].Visible = false; dgvSellTransaction.Columns["Discount"].Visible = false; dgvSellTransaction.AllowUserToAddRows = false; dgvSellTransaction.AllowUserToDeleteRows = false; } }
private void Usp_BindSellTransactionGrid(int SaleTransactionID) { DataTable dt = new DataTable(); BLSaleTransaction objBL = new BLSaleTransaction(); dt = objBL.BindFullGrid(SaleTransactionID); if (dt.Rows.Count > 0) { dgvSellTransaction.DataSource = dt; //dgvSellTransaction.Columns[0].HeaderCell.Value = "Medical Name"; ////dgvSellTransaction.Columns[1].HeaderCell.Value = "Doctor Name"; //dgvSellTransaction.Columns[2].HeaderCell.Value = "Product Name"; //dgvSellTransaction.Columns[3].HeaderCell.Value = "Selling Price"; //dgvSellTransaction.Columns[4].HeaderCell.Value = "Date"; //dgvSellTransaction.Columns[5].HeaderCell.Value = "Quantity"; //dgvSellTransaction.Columns[6].HeaderCell.Value = "Warehouse"; ////dgvSellTransaction.Columns[7].HeaderCell.Value = "Country"; ////dgvSellTransaction.Columns[8].HeaderCell.Value = "State"; ////dgvSellTransaction.Columns[7].HeaderCell.Value = "City"; ////dgvSellTransaction.Columns[8].HeaderCell.Value = "Area"; dgvSellTransaction.Refresh(); dgvSellTransaction.Show(); dgvSellTransaction.Columns["ProductID"].Visible = false; dgvSellTransaction.Columns["WarehouseID"].Visible = false; dgvSellTransaction.Columns["Discount"].Visible = false; dgvSellTransaction.AllowUserToAddRows = false; dgvSellTransaction.AllowUserToDeleteRows = false; } else { dgvSellTransaction.DataSource = null; dgvSellTransaction.Refresh(); dgvSellTransaction.Show(); } }