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