public void List_Option(ListOption pAction) { fAction = pAction; switch (fAction) { case ListOption.notactive: if (rdo_notactive.Checked == true) { LoadData(CReceipt_exten.Notactive()); } else { LoadData(CReceipt_exten.Showall()); } break; case ListOption.Search: LoadData(CReceipt_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text)); break; default: LoadData(CReceipt_exten.Showall()); break; } }
public void SetAction(BtnEvent action, string pk) { fAction = action; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CReceipt_exten.PKId(pk); list = CReceiptitems_exten.FKId(pk); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CReceipt.GetNew; list = CReceiptitems.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CReceipt_exten.PKId(pk); list = CReceiptitems_exten.FKId(pk); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CReceipt_exten.PKId(pk); list = CReceiptitems_exten.FKId(pk); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CReceipt_exten.PKId(pk); list = CReceiptitems_exten.FKId(pk); this.EnableControls(false); // print_panel.Show(); break; } LoadData(obj); Loaditems(list); }
void Txt_no_LookupUpdate(object sender, EventArgs e) { txt_no.LookupList = CReceipt_exten.LookupNo(); }