public void List_Option(ListOption pAction) { fAction = pAction; switch (fAction) { case ListOption.active: if (chk_notactive.Checked == true) { LoadData(CVoucher_exten.NotActive(new DAL())); } else { LoadData(CVoucher_exten.Active(new DAL())); } break; case ListOption.notactive: if (chk_notactive.Checked == true) { LoadData(CVoucher_exten.NotActive(new DAL())); } else { LoadData(CVoucher_exten.Active(new DAL())); } break; case ListOption.Search: List <Voucher> list = CVoucher_exten.Searchfilter( txt_voucher_no.Text , txt_voucher_no_1.Text , txt_voucher_date.Text , txt_voucher_date_1.Text , CVouchertype_exten.GetId_Name(txt_vouchertype.Text) , COrder_exten.GetId_Name(txt_orderref.Text) , CLedger_exten.GetId_Name(txt_ledger.Text) , CParty_exten.GetId_Name(txt_party.Text) , txt_purpose.Text , new DAL()); LoadData(list); break; default: LoadData(CVoucher_exten.Active(new DAL())); break; } }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "CLOSE"; obj = CVoucher_exten.PKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "SAVE"; obj = CVoucher.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "UPDATE"; obj = CVoucher_exten.PKId(pPkValue, new DAL()); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\nDELETE"; obj = CVoucher_exten.PKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "PRINT"; obj = CVoucher_exten.PKId(pPkValue, new DAL()); this.EnableControls(false); break; } this.LoadData(); }
void Txt_purpose_LookupUpdate(object sender, EventArgs e) { txt_purpose.LookupList = CVoucher_exten.Purpose_lookup(new DAL()); }
void Txt_party_LookupUpdate(object sender, EventArgs e) { txt_party.LookupList = CVoucher_exten.Party_lookup(new DAL()); }
void Txt_ledger_LookupUpdate(object sender, EventArgs e) { txt_ledger.LookupList = CVoucher_exten.Ledger_lookup(new DAL()); }
void Txt_orderref_LookupUpdate(object sender, EventArgs e) { txt_orderref.LookupList = CVoucher_exten.Orderref_lookup(new DAL()); }
void Txt_vouchertype_LookupUpdate(object sender, EventArgs e) { txt_vouchertype.LookupList = CVoucher_exten.Vouchertype_lookup(new DAL()); }