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