Exemplo n.º 1
0
		///<summary></summary>
		public static long Insert(Automation auto) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				auto.AutomationNum=Meth.GetLong(MethodBase.GetCurrentMethod(),auto);
				return auto.AutomationNum;
			}
			return Crud.AutomationCrud.Insert(auto);
		}
Exemplo n.º 2
0
		///<summary></summary>
		public static void Update(Automation auto) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),auto);
				return;
			}
			Crud.AutomationCrud.Update(auto);
		}
Exemplo n.º 3
0
		///<summary></summary>
		public static void Delete(Automation auto) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),auto);
				return;
			}
			string command="DELETE FROM automation" 
				+" WHERE AutomationNum = "+POut.Long(auto.AutomationNum);
 			Db.NonQ(command);
		}
		///<summary></summary>
		public FormAutomationEdit(Automation autoCur)
		{
			//
			// Required for Windows Form Designer support
			//
			AutoCur=autoCur.Copy();
			InitializeComponent();
			Lan.F(this);
		}
Exemplo n.º 5
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			Automation auto=new Automation();
			Automations.Insert(auto);//so that we can attach conditions
			FormAutomationEdit FormA=new FormAutomationEdit(auto);
			FormA.IsNew=true;
			FormA.ShowDialog();
			if(FormA.DialogResult!=DialogResult.OK){
				return;
			}
			FillGrid();
			changed=true;
		}