예제 #1
0
 public static IDictionary <string, object> ToDictionary(this EmployeeTerritories item)
 {
     return(new Dictionary <string, object>()
     {
         [_EMPLOYEEID] = item.EmployeeID,
         [_TERRITORYID] = item.TerritoryID
     });
 }
예제 #2
0
 public static void UpdateRow(this EmployeeTerritories item, DataRow row)
 {
     row.SetField(_EMPLOYEEID, item.EmployeeID);
     row.SetField(_TERRITORYID, item.TerritoryID);
 }
예제 #3
0
 public static void FillObject(this EmployeeTerritories item, DataRow row)
 {
     item.EmployeeID  = row.GetField <int>(_EMPLOYEEID);
     item.TerritoryID = row.GetField <string>(_TERRITORYID);
 }
예제 #4
0
 public static string ToSimpleString(this EmployeeTerritories obj)
 {
     return(string.Format("{{EmployeeID:{0}, TerritoryID:{1}}}",
                          obj.EmployeeID,
                          obj.TerritoryID));
 }
예제 #5
0
 public static EmployeeTerritoriesAssociation GetAssociation(this EmployeeTerritories entity)
 {
     return(entity.AsEnumerable().GetAssociation().FirstOrDefault());
 }
예제 #6
0
 public static void CopyTo(this EmployeeTerritories from, EmployeeTerritories to)
 {
     to.EmployeeID  = from.EmployeeID;
     to.TerritoryID = from.TerritoryID;
 }
예제 #7
0
 public static bool CompareTo(this EmployeeTerritories a, EmployeeTerritories b)
 {
     return(a.EmployeeID == b.EmployeeID &&
            a.TerritoryID == b.TerritoryID);
 }