void frmEntryBill_Load(object sender, EventArgs e) { FillDropDown(); if (BillId > 0) { var bill = BillBusinessLogic.Get(BillId); ; textbillno.Text = Convert.ToString(bill.BillNo); dateTimebilldate.Text = Convert.ToString(bill.BillDateString); cmbParty.SelectedItem = Convert.ToString(bill.PartyId); textbranchcode.Text = bill.BranchCode; dateTimeduedate.Text = Convert.ToString(bill.PaymentDueDateString); combotickbill.SelectedItem = bill.BillType; textbasicofchange.Text = bill.BasicOfChargesGC; textenclosure.Text = bill.Enclosure; comboservicetax.SelectedItem = bill.ServiceTaxThrough; textcheckedby.Text = bill.CheckedBy; texttaxregdno.Text = bill.ServiceTaxThrough; textservicetax.Text = bill.ServiceTaxRegdNo; int i = 1; foreach (var item in bill.BillEntryList) { item.SrNo = i++; CommonClass.tblBillEntryDTO.Add(item); } fillGridData(); } else { textbillno.Text = Convert.ToString(BillBusinessLogic.GetBillNo() + 1); } }
public ActionResult Save(int id) { tblBillDTO tblBillDTO = new tblBillDTO(); if (id == 0) { tblBillDTO = new tblBillDTO(); tblBillDTO.BillNo = BillBusinessLogic.GetBillNo() + 1; } else { tblBillDTO = BillBusinessLogic.Get(id); } tblBillDTO = FillDropDown(tblBillDTO); return(View(tblBillDTO)); }
private void CleanData() { textbillno.Text = ""; dateTimebilldate.Text = ""; cmbParty.SelectedValue = ""; textbranchcode.Text = ""; dateTimeduedate.Text = ""; combotickbill.SelectedItem = ""; textbasicofchange.Text = ""; textenclosure.Text = ""; comboservicetax.SelectedItem = ""; textcheckedby.Text = ""; textservicetax.Text = ""; CommonClass.tblBillEntryDTO.Clear(); grdEntryBill.DataSource = null; textbillno.Text = Convert.ToString(BillBusinessLogic.GetBillNo() + 1); cmbParty.Focus(); }