Пример #1
0
		///<summary></summary>
		public static void Update(Contact Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			Crud.ContactCrud.Update(Cur);
		}
Пример #2
0
		///<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);
		}
Пример #3
0
		///<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);
		}
Пример #4
0
		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();
		}