public void List_Option(ListOption action) { fAction = action; switch (fAction) { case ListOption.active: if (chk_notactive.Checked == true) { LoadData(CCompany_bank_exten.NotActive()); } else { LoadData(CCompany_bank_exten.Active()); } break; case ListOption.notactive: if (chk_notactive.Checked == true) { LoadData(CCompany_bank_exten.NotActive()); } else { LoadData(CCompany_bank_exten.Active()); } break; case ListOption.Search: if (txt_company_bank_name.Text != "") { List <Company_bank> list = new List <Company_bank> { CCompany_bank_exten.SearchName(txt_company_bank_name.Text) }; LoadData(list); } else { LoadData(CCompany_bank_exten.Active()); } break; default: LoadData(CCompany_bank_exten.Active()); break; } }
public void SetAction(BtnEvent action, string pk) { fAction = action; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CCompany_bank_exten.PKId(pk); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CCompany_bank.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CCompany_bank_exten.PKId(pk); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CCompany_bank_exten.PKId(pk); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CCompany_bank_exten.PKId(pk); this.EnableControls(false); break; } this.LoadData(); }
void txt_company_bank_LookupUpdate(object sender, EventArgs e) { txt_company_bank_name.LookupList = CCompany_bank_exten.GetforLookup(); }