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