Inheritance: System.Data.Objects.DataClasses.EntityObject
        /// <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);
        }
示例#2
0
        public Software_Requirement InsertRequirement(Software_Requirement sr)
        {
            sr.createddate = DateTime.Now;

            IPFinalDBDataContext finalDB = new IPFinalDBDataContext();
            finalDB.Software_Requirements.InsertOnSubmit(sr);

            finalDB.SubmitChanges();

            return sr;
        }
示例#3
0
        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;
        }
示例#4
0
        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);
            }
        }
示例#5
0
 partial void DeleteSoftware_Requirement(Software_Requirement instance);
示例#6
0
 partial void UpdateSoftware_Requirement(Software_Requirement instance);
示例#7
0
 partial void InsertSoftware_Requirement(Software_Requirement instance);
 partial void DeleteSoftware_Requirement(Software_Requirement instance);
 partial void UpdateSoftware_Requirement(Software_Requirement instance);
 partial void InsertSoftware_Requirement(Software_Requirement instance);
示例#11
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Software_Requirement EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSoftware_Requirement(Software_Requirement software_Requirement)
 {
     base.AddObject("Software_Requirement", software_Requirement);
 }
示例#12
0
 /// <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;
 }
示例#13
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Software_Requirement EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSoftware_Requirement(Software_Requirement software_Requirement)
 {
     base.AddObject("Software_Requirement", software_Requirement);
 }