public static string GetCity_id(string _id) { Party obj = CParty_exten.PKId(_id, new DAL()); if (obj != null) { return(obj.City_id); } return(""); }
public void List_Option(ListOption pAction) { fAction = pAction; switch (fAction) { case ListOption.active: if (chk_notactive.Checked == true) { LoadData(CParty_exten.NotActive(new DAL())); } else { LoadData(CParty_exten.Active(new DAL())); } break; case ListOption.notactive: if (chk_notactive.Checked == true) { LoadData(CParty_exten.NotActive(new DAL())); } else { LoadData(CParty_exten.Active(new DAL())); } break; case ListOption.Search: if (txt_party_name.Text != "") { List <Party> list = new List <Party> { CParty_exten.SearchName(txt_party_name.Text, new DAL()) }; LoadData(list); } else { LoadData(CParty_exten.Active(new DAL())); } break; default: LoadData(CParty_exten.Active(new DAL())); break; } }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CParty_exten.PKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CParty.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CParty_exten.PKId(pPkValue, new DAL()); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CParty_exten.PKId(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CParty_exten.PKId(pPkValue, new DAL()); this.EnableControls(false); break; } this.LoadData(); }
void txt_party_LookupUpdate(object sender, EventArgs e) { txt_party_name.LookupList = CParty_exten.GetforLookup(new DAL()); }