Пример #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ROandProjects EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToROandProjects(ROandProject rOandProject)
 {
     base.AddObject("ROandProjects", rOandProject);
 }
Пример #2
0
 public int AddRO(RO obj)
 {
     obj.DateAdd = DateTime.Now;
     obj.DateUpdate = DateTime.Now;
     obj.Suser = System.Web.Security.Membership.GetUser().ToString();
     db.ROes.AddObject(obj);
     db.SaveChanges();
     ROandProject RoPr = new ROandProject();
     RoPr.ROID = obj.ROID;
     RoPr.ProjectID = (int)obj.PrimaryProjectID;
     RoPr.DateAdd = DateTime.Now;
     RoPr.DateUpdate = DateTime.Now;
     RoPr.Suser = System.Web.Security.Membership.GetUser().ToString();
     db.ROandProjects.AddObject(RoPr);
     db.ObjectStateManager.ChangeObjectState(RoPr, EntityState.Added);
     db.SaveChanges();
     return obj.ROID;
 }
Пример #3
0
 /// <summary>
 /// Create a new ROandProject object.
 /// </summary>
 /// <param name="projectID">Initial value of the ProjectID property.</param>
 /// <param name="rOID">Initial value of the ROID property.</param>
 /// <param name="rOProjectID">Initial value of the ROProjectID property.</param>
 public static ROandProject CreateROandProject(global::System.Int32 projectID, global::System.Int32 rOID, global::System.Int32 rOProjectID)
 {
     ROandProject rOandProject = new ROandProject();
     rOandProject.ProjectID = projectID;
     rOandProject.ROID = rOID;
     rOandProject.ROProjectID = rOProjectID;
     return rOandProject;
 }