public int insertHeaderRecord(DateTime processdate, string status, string deptCode) { DeptRequisition header = new DeptRequisition(); header.Department_Code = deptCode; header.Date = processdate; header.Status_Check = status; entity.DeptRequisitions.AddObject(header); entity.SaveChanges(); j = header.Dept_ReqID; return j; }
/// <summary> /// Deprecated Method for adding a new object to the DeptRequisitions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDeptRequisitions(DeptRequisition deptRequisition) { base.AddObject("DeptRequisitions", deptRequisition); }
/// <summary> /// Create a new DeptRequisition object. /// </summary> /// <param name="dept_ReqID">Initial value of the Dept_ReqID property.</param> /// <param name="department_Code">Initial value of the Department_Code property.</param> /// <param name="date">Initial value of the Date property.</param> public static DeptRequisition CreateDeptRequisition(global::System.Int32 dept_ReqID, global::System.String department_Code, global::System.DateTime date) { DeptRequisition deptRequisition = new DeptRequisition(); deptRequisition.Dept_ReqID = dept_ReqID; deptRequisition.Department_Code = department_Code; deptRequisition.Date = date; return deptRequisition; }