/// <summary> /// Create a new Software_Requirement object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="title">Initial value of the title property.</param> /// <param name="createddate">Initial value of the createddate property.</param> /// <param name="platform">Initial value of the platform property.</param> public static Software_Requirement CreateSoftware_Requirement(global::System.Int32 id, global::System.String title, global::System.DateTime createddate, global::System.String platform) { Software_Requirement software_Requirement = new Software_Requirement(); software_Requirement.id = id; software_Requirement.title = title; software_Requirement.createddate = createddate; software_Requirement.platform = platform; return(software_Requirement); }
public Software_Requirement InsertRequirement(Software_Requirement sr) { sr.createddate = DateTime.Now; IPFinalDBDataContext finalDB = new IPFinalDBDataContext(); finalDB.Software_Requirements.InsertOnSubmit(sr); finalDB.SubmitChanges(); return sr; }
public Software_Requirement UpdateRequirement(Software_Requirement sr) { IPFinalDBDataContext finalDB = new IPFinalDBDataContext(); var requirement = (from d in finalDB.Software_Requirements where d.id == sr.id select d).Single(); requirement.description = sr.description; requirement.platform = sr.platform; requirement.title = sr.title; finalDB.SubmitChanges(); return requirement; }
public ActionResult Edit(int? id, Software_Requirement model) { model.id = id ?? -1; try { if (id == null) { rs.InsertRequirement(model); return RedirectToAction("Index"); } else { rs.UpdateRequirement(model); return RedirectToAction("Details",new {id = model.id}); } } catch { return View(model); } }
partial void DeleteSoftware_Requirement(Software_Requirement instance);
partial void UpdateSoftware_Requirement(Software_Requirement instance);
partial void InsertSoftware_Requirement(Software_Requirement instance);
/// <summary> /// Deprecated Method for adding a new object to the Software_Requirement EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSoftware_Requirement(Software_Requirement software_Requirement) { base.AddObject("Software_Requirement", software_Requirement); }
/// <summary> /// Create a new Software_Requirement object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="title">Initial value of the title property.</param> /// <param name="createddate">Initial value of the createddate property.</param> /// <param name="platform">Initial value of the platform property.</param> public static Software_Requirement CreateSoftware_Requirement(global::System.Int32 id, global::System.String title, global::System.DateTime createddate, global::System.String platform) { Software_Requirement software_Requirement = new Software_Requirement(); software_Requirement.id = id; software_Requirement.title = title; software_Requirement.createddate = createddate; software_Requirement.platform = platform; return software_Requirement; }