public void List_Option(ListOption pAction) { if (constructed_flag == false) { return; } fAction = pAction; switch (fAction) { case ListOption.refer: if (rdo_refer.Checked == true) { LoadData(CUpvc_invoice_exten.Refer(new DAL())); } else { LoadData(CUpvc_invoice_exten.Unrefer(new DAL())); } break; case ListOption.showall: if (rdo_showall.Checked == true) { LoadData(CUpvc_invoice_exten.Showall(new DAL())); } else { LoadData(CUpvc_invoice_exten.Unrefer(new DAL())); } break; case ListOption.notactive: if (rdo_notactive.Checked == true) { LoadData(CUpvc_invoice_exten.Notactive(new DAL())); } else { LoadData(CUpvc_invoice_exten.Unrefer(new DAL())); } break; case ListOption.Search: LoadData(CUpvc_invoice_exten.Searchby(txt_no.Text, txt_date.Text, txt_party.Text, new DAL())); break; default: LoadData(CUpvc_invoice_exten.Unrefer(new DAL())); break; } }
private List <PUpvcSales> CollectSales(string id) { List <PUpvcSales> list = new List <PUpvcSales>(); CXCORE.Company company = CXCORE.CCompany_exten.PKId(Current.Company_id); Upvc_invoice invoice = CUpvc_invoice_exten.PKId(id, new DAL()); CXCORE.Party party = CXCORE.CParty_exten.PKId(invoice.Party_id, new DAL()); CXCORE.Party consignee = CXCORE.CParty_exten.PKId(invoice.Party_id, new DAL()); PUpvcSales obj = new PUpvcSales() { Company_name = company.Company_name, Company_address = company.Street1 + "" + company.Street2 + "" + company.City_id + "" + company.State_id + " ", Company_address_1 = company.Email + "" + company.Website, Company_gstin = company.Gstin + "" + company.Cell1, Invoice_no = invoice.Invoice_no, Invoice_date = invoice.Invoice_date, billtobill = invoice.Taxtype_id, Sales_type = invoice.Salestype_id, PlaceOfSupply = invoice.Delivered_id, Party_name = party.Party_name, Party_adress = party.Street_1 + "" + party.Street_2, Party_adress_1 = party.City_id + "" + party.Pincode_id, Party_gstin = party.Gstin, Consignee_name = consignee.Party_name, Consignee_address = consignee.Street_1 + "" + consignee.Street_2, Consignee_address_1 = consignee.City_id + "" + consignee.Pincode_id, Consignee_gstin = consignee.Gstin, Transport = invoice.Transport_id, Taxable_value = invoice.Total_taxable_amount.ToString(), Cgst_tax = invoice.Total_cgst.ToString(), Sgst_tax = invoice.Total_sgst.ToString(), Gst_total = invoice.Gsttotal.ToString(), Roundoff = invoice.Rounds.ToString(), GrandTotal = invoice.Grandtotal.ToString(), Amountinwords = Global.AmountInWords(invoice.Grandtotal), }; list.Add(obj); return(list); }
private void Btn_delete_Click(object sender, EventArgs e) { string pkValue = GetSelectedPkValue(); if (CUpvc_invoice_exten.LockStatus(pkValue) == false) { BuildForm(); if (pkValue != null) { fupvc_invoice.SetAction(BtnEvent.Delete, pkValue); fupvc_invoice.SetFocus(); } } }
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); }
void Txt_party_LookupUpdate(object sender, EventArgs e) { txt_party.LookupList = CUpvc_invoice_exten.LookupParty(new DAL()); }
void Txt_date_LookupUpdate(object sender, EventArgs e) { txt_date.LookupList = CUpvc_invoice_exten.LookupDate(new DAL()); }