public void List_Option(ListOption pAction) { fAction = pAction; switch (fAction) { case ListOption.refer: if (rdo_refer.Checked == true) { LoadData(CInward_exten.Refer()); } else { LoadData(CInward_exten.Unrefer()); } break; case ListOption.showall: if (rdo_showall.Checked == true) { LoadData(CInward_exten.Showall()); } else { LoadData(CInward_exten.Unrefer()); } break; case ListOption.notactive: if (rdo_notactive.Checked == true) { LoadData(CInward_exten.Notactive()); } else { LoadData(CInward_exten.Unrefer()); } break; case ListOption.Search: LoadData(CInward_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text)); break; default: LoadData(CInward_exten.Showall()); break; } }
private void Btn_delete_Click(object sender, EventArgs e) { string pkValue = GetSelectedPkValue(); if (CInward_exten.LockStatus(pkValue) == false) { BuildForm(); if (pkValue != null) { finvoice.SetAction(BtnEvent.Delete, pkValue); finvoice.SetFocus(); } } }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CInward_exten.PKId(pPkValue); list = CInwarditems_exten.FKId(pPkValue); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CInward.GetNew; list = CInwarditems.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CInward_exten.PKId(pPkValue); list = CInwarditems_exten.FKId(pPkValue); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CInward_exten.PKId(pPkValue); list = CInwarditems_exten.FKId(pPkValue); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CInward_exten.PKId(pPkValue); list = CInwarditems_exten.FKId(pPkValue); this.EnableControls(false); print_panel.Show(); break; } LoadData(obj); Loaditems(list); }
void Txt_party_LookupUpdate(object sender, EventArgs e) { txt_party.LookupList = CInward_exten.LookupParty(); }
void Txt_no_LookupUpdate(object sender, EventArgs e) { txt_no.LookupList = CInward_exten.LookupNo(); }