예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadcrossrefttcriteria(ref DataRow row, Loadcrossrefttcriteria entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("altprod", entity.altprod);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("vendno", entity.vendno);
     row.SetField("rectype", entity.rectype);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("customparam", entity.customparam);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Loadcrossrefttcriteria BuildLoadcrossrefttcriteriaFromRow(DataRow row)
        {
            Loadcrossrefttcriteria entity = new Loadcrossrefttcriteria();

            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.altprod          = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod");
            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.rectype          = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.customparam      = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }