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