コード例 #1
0
 public DepartmentRep GetRepByRepId(int id)
 {
     var q = (from r in edm.DepartmentReps where r.RepID == id select r);
     DepartmentRep rep = new DepartmentRep();
     rep = q.First<DepartmentRep>();
     return rep;
 }
コード例 #2
0
 public DepartmentRep GetRepsByDeptCode(string code)
 {
     var q = (from r in edm.DepartmentReps where r.Department_Code.Equals(code) select r);
     DepartmentRep rep = new DepartmentRep();
     rep = q.First<DepartmentRep>();
     return rep;
 }
コード例 #3
0
        public void AddDeptRep(int id, string code)
        {
            DepartmentRep rep = new DepartmentRep();

            rep.EmployeeID = id;
            rep.Department_Code = code;
            edm.DepartmentReps.AddObject(rep);
            this.edm.SaveChanges();
        }
コード例 #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the DepartmentReps EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDepartmentReps(DepartmentRep departmentRep)
 {
     base.AddObject("DepartmentReps", departmentRep);
 }
コード例 #5
0
 /// <summary>
 /// Create a new DepartmentRep object.
 /// </summary>
 /// <param name="repID">Initial value of the RepID property.</param>
 /// <param name="department_Code">Initial value of the Department_Code property.</param>
 /// <param name="employeeID">Initial value of the EmployeeID property.</param>
 public static DepartmentRep CreateDepartmentRep(global::System.Int32 repID, global::System.String department_Code, global::System.Int32 employeeID)
 {
     DepartmentRep departmentRep = new DepartmentRep();
     departmentRep.RepID = repID;
     departmentRep.Department_Code = department_Code;
     departmentRep.EmployeeID = employeeID;
     return departmentRep;
 }