private void BindGridDataToheader(int RowIndex) { CurrentAvailableItems = 0; SetTextToDropDownItem(DataGridDetails.Rows[RowIndex].Cells["item_code"].Value.ToString(), DataGridDetails.Rows[RowIndex].Cells["item_name"].Value.ToString()); SetTextToDropDownBrand(DataGridDetails.Rows[RowIndex].Cells["brand_code"].Value.ToString(), DataGridDetails.Rows[RowIndex].Cells["brand_name"].Value.ToString()); SetTextToDropDownProduct(DataGridDetails.Rows[RowIndex].Cells["product_code"].Value.ToString(), DataGridDetails.Rows[RowIndex].Cells["product_name"].Value.ToString()); SetTextToDropDownColor(DataGridDetails.Rows[RowIndex].Cells["color_code"].Value.ToString(), DataGridDetails.Rows[RowIndex].Cells["color_name"].Value.ToString()); TxtHSNCode.Text = DataGridDetails.Rows[RowIndex].Cells["hsn_code"].Value.ToString(); TxtArDescription.Text = DataGridDetails.Rows[RowIndex].Cells["description"].Value.ToString(); TxtNoOfItems.Text = DataGridDetails.Rows[RowIndex].Cells["quantity"].Value.ToString(); TxtRate.Text = DataGridDetails.Rows[RowIndex].Cells["rate"].Value.ToString(); TxtCgstPer.Text = DataGridDetails.Rows[RowIndex].Cells["cgst_per"].Value.ToString(); TxtCgstRs.Text = DataGridDetails.Rows[RowIndex].Cells["cgst_amount"].Value.ToString(); TxtSgstPer.Text = DataGridDetails.Rows[RowIndex].Cells["sgst_per"].Value.ToString(); TxtSgstRs.Text = DataGridDetails.Rows[RowIndex].Cells["sgst_amount"].Value.ToString(); TxtSingleTotal.Text = DataGridDetails.Rows[RowIndex].Cells["sigle_total_amount"].Value.ToString(); SalesLineId = Convert.ToInt32(DataGridDetails.Rows[RowIndex].Cells["sales_line_id"].Value.ToString()); PurchaseIdSale = Convert.ToInt32(DataGridDetails.Rows[RowIndex].Cells["purchase_id"].Value.ToString()); PurchaseLineIdSale = Convert.ToInt32(DataGridDetails.Rows[RowIndex].Cells["purchase_line_id"].Value.ToString()); TxtDiscountHeader.Text = DataGridDetails.Rows[RowIndex].Cells["discount_header"].Value.ToString(); TxtTotaltaxHeader.Text = (Convert.ToDouble(DataGridDetails.Rows[RowIndex].Cells["cgst_amount"].Value) + Convert.ToDouble(DataGridDetails.Rows[RowIndex].Cells["sgst_amount"].Value)).ToString(); CurrentAvailableItems = Convert.ToInt32(DataGridDetails.Rows[RowIndex].Cells["number_of_items_available"].Value.ToString()); LblAvaiableItems.Text = "(" + CurrentAvailableItems.ToString() + ")"; LblAvaiableItems.Show(); }
private void Sales_Load(object sender, EventArgs e) { if (UserInfo.UserRole == 1) { PanelIsEmployee.Hide(); } else { PanelIsEmployee.Show(); } LblWelcome.Text = "Welcome: " + UserInfo.UserName; LblHeaderText.BackColor = Color.FromName(CmC.LblBackColor); LblHeaderText.Font = new Font(CmC.LblFontStyle, CmC.LblFontSize); //, 17pt, style=Bold LblHeaderText.Font = new Font(LblHeaderText.Font, FontStyle.Bold); LblHeaderText.ForeColor = Color.FromName(CmC.LblFontColor); Grouppurchase.Update(); datagriddesign(); if (SalesId_Sales != 0) { IsAllowTextChange = false; LblInvoiceNumber.Show(); TxtNoOfItems.Enabled = false; LblAvaiableItems.Hide(); LoadInsertedData(); IsAllowTextChange = true; } else { LblInvoiceNumber.Hide(); GetItemList(); GetUnitAndPaymentTypeDropDown(); } }
private void EmptyBtnaddListcontrols() { LblAvaiableItems.Hide(); EmptyProductListDropDown(); EmptyBrandListDropDown(); EmptyItemListDropDown(); EmptyColorListDropDown(); foreach (Control ctr in Grouppurchase.Controls) { if (ctr is TextBox) { ctr.Text = ""; } if (ctr is RichTextBox) { ctr.Text = ""; } } GetItemList(); if (DataGridDetails.Rows.Count > 0) { GetGrossAmountTotal(); } GetUnitAndPaymentTypeDropDown(); BtnInsertUpdateGrid.Text = "Add"; }
public void ApplyProductDetails(DataTable DtproductList) { ClearPurchaseDetailsGroup(); LblAvaiableItems.Show(); NoOfItemsSignle = 1; CurrentAvailableItems = 0; IsAllowTextChange = false; DiscountAmountHeader = 0; PurchaseIdSale = Convert.ToInt32(DtproductList.Rows[0]["purchase_id"].ToString()); PurchaseLineIdSale = Convert.ToInt32(DtproductList.Rows[0]["purchase_line_id"].ToString()); SinglePrice = Convert.ToDouble(DtproductList.Rows[0]["selling_price"].ToString()); SingleCgstPer = Convert.ToDouble(DtproductList.Rows[0]["cgst_per"].ToString()); SingleSgstPer = Convert.ToDouble(DtproductList.Rows[0]["sgst_per"].ToString()); TxtDiscountHeader.Text = DiscountAmountHeader.ToString(); TxtHSNCode.Text = DtproductList.Rows[0]["hsn_code"].ToString(); TxtArDescription.Text = DtproductList.Rows[0]["description"].ToString(); CurrentAvailableItems = Convert.ToInt32(DtproductList.Rows[0]["number_of_items_available"].ToString()); LblAvaiableItems.Text = "(" + DtproductList.Rows[0]["number_of_items_available"].ToString() + ")"; SetAllCalculationsTextBox(); //messageShow.singlemsgtext("Have to work on here"); }