///<summary></summary> public static void Update(Contact Cur){ if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur); return; } Crud.ContactCrud.Update(Cur); }
///<summary></summary> public static long Insert(Contact Cur) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Cur.ContactNum=Meth.GetLong(MethodBase.GetCurrentMethod(),Cur); return Cur.ContactNum; } return Crud.ContactCrud.Insert(Cur); }
///<summary></summary> public static void Delete(Contact Cur){ if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur); return; } string command = "DELETE FROM contact WHERE contactnum = '"+Cur.ContactNum.ToString()+"'"; Db.NonQ(command); }
private void butAdd_Click(object sender, System.EventArgs e) { Contact ContactCur=new Contact(); ContactCur.Category=DefC.Short[(int)DefCat.ContactCategories][listCategory.SelectedIndex].DefNum; FormContactEdit FormCE=new FormContactEdit(); FormCE.ContactCur=ContactCur; FormCE.IsNew=true; FormCE.ShowDialog(); if(FormCE.DialogResult==DialogResult.OK) FillGrid(); }