private List <PUpvcSales_items> CollectSalesItems(string id) { List <Upvc_invoiceitems> list = CUpvc_invoiceitems_exten.FKId(id, new DAL()); List <PUpvcSales_items> klist = new List <PUpvcSales_items>(); int i = 0; foreach (var item in list) { PUpvcSales_items obj = new PUpvcSales_items() { Sno = ++i, Description = item.Product_id, Height = item.Heights, Width = item.Widths, Hsncode = CXCORE.Ccoreplus.GetHsncode_Id(item.Product_id), Sgst_amt = item.Sgst_percent, Cgst_amt = item.Cgst_percent, Igst_amt = item.Igst_percent, qty = item.Qty, TotalAreasq = item.TotalAreasq, Taxable_amt = item.Taxable_amount, Price = item.Price }; klist.Add(obj); } return(klist); }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CUpvc_invoice_exten.PKId(pPkValue, new DAL()); list = CUpvc_invoiceitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CUpvc_invoice.GetNew(); list = new List <Upvc_invoiceitems>(); this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CUpvc_invoice_exten.PKId(pPkValue, new DAL()); list = CUpvc_invoiceitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CUpvc_invoice_exten.PKId(pPkValue, new DAL()); list = CUpvc_invoiceitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CUpvc_invoice_exten.PKId(pPkValue, new DAL()); list = CUpvc_invoiceitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(false); print_panel.Show(); break; } LoadData(obj); Loaditems(list); }