Пример #1
0
 public void Execute(ref Application application)
 {
     Parameters.AddWithValue("@ApplicationName", application.Name);
     Parameters.AddWithValue("@AppVersion", application.Version);
     Parameters.AddWithValue("@MachineName", application.MachineName);
     Parameters.AddWithValue("@UserName", Environment.UserName);
     DataTable t = ExecuteReader();
     if (t.Rows.Count > 0)
     {
         application.ApplicationID = t.Rows[0].Field<int>(0);
     }
 }
 public Application Clone()
 {
     Application result = new Application();
     result.ApplicationID = this.ApplicationID;
     result.Name = this.Name;
     result.Version = this.Version;
     result.MachineName = this.MachineName;
     result.CreatedDT = this.CreatedDT;
     result.CreatedBy = this.CreatedBy;
     result.LastUsed = this.LastUsed;
     return result;
 }
 public void ApplicationSave(ref Application app)
 {
     spAddApplication proc = new spAddApplication(ConnectionString);
     proc.Execute(ref app);
 }