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