public void List_Option(ListOption pAction) { fAction = pAction; switch (fAction) { //case ListOption.refer: // if (rdo_refer.Checked == true) // { // LoadData(CReceipt_exten.Refer(new DAL())); // } // else // { // LoadData(CReceipt_exten.Unrefer(new DAL())); // } // break; case ListOption.showall: if (rdo_showall.Checked == true) { LoadData(CPayment_exten.Showall(new DAL())); } else { LoadData(CPayment_exten.Unrefer(new DAL())); } break; case ListOption.notactive: if (rdo_notactive.Checked == true) { LoadData(CPayment_exten.Notactive(new DAL())); } else { LoadData(CPayment_exten.Unrefer(new DAL())); } break; case ListOption.Search: LoadData(CPayment_exten.Searchby(txt_no.Text, txt_date.Text, txt_party.Text, new DAL())); break; default: LoadData(CPayment_exten.Unrefer(new DAL())); break; } }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CPayment_exten.PKId(pPkValue, new DAL()); list = CPaymentitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CPayment.GetNew; list = CPaymentitems.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CPayment_exten.PKId(pPkValue, new DAL()); list = CPaymentitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CPayment_exten.PKId(pPkValue, new DAL()); list = CPaymentitems_exten.FKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CPayment_exten.PKId(pPkValue, new DAL()); list = CPaymentitems_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 = CPayment_exten.LookupParty(new DAL()); }
void Txt_date_LookupUpdate(object sender, EventArgs e) { txt_date.LookupList = CPayment_exten.LookupDate(new DAL()); }
void Txt_no_LookupUpdate(object sender, EventArgs e) { txt_no.LookupList = CPayment_exten.LookupNo(new DAL()); }