Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArshiptolookupcriteria(ref DataRow row, Arshiptolookupcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("phoneno", entity.phoneno);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("firstnm", entity.firstnm);
     row.SetField("lastnm", entity.lastnm);
     row.SetField("includeallshiptos", entity.includeallshiptos);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Arshiptolookupcriteria BuildArshiptolookupcriteriaFromRow(DataRow row)
        {
            Arshiptolookupcriteria entity = new Arshiptolookupcriteria();

            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.phoneno           = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno");
            entity.city              = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state             = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd             = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.firstnm           = row.IsNull("firstnm") ? string.Empty : row.Field <string>("firstnm");
            entity.lastnm            = row.IsNull("lastnm") ? string.Empty : row.Field <string>("lastnm");
            entity.includeallshiptos = row.Field <bool>("includeallshiptos");
            entity.recordcountlimit  = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }