Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsecretrievecriteria(ref DataRow row, Icsecretrievecriteria entity)
 {
     row.SetField("rectype", entity.rectype);
     row.SetField("altprod", entity.altprod);
     row.SetField("prod", entity.prod);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("includeshiptowithcustfl", entity.includeshiptowithcustfl);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icsecretrievecriteria BuildIcsecretrievecriteriaFromRow(DataRow row)
        {
            Icsecretrievecriteria entity = new Icsecretrievecriteria();

            entity.rectype = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype");
            entity.altprod = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod");
            entity.prod    = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.custno  = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto  = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.includeshiptowithcustfl = row.Field <bool>("includeshiptowithcustfl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }