Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEmailforshipnoticeresults(ref DataRow row, Emailforshipnoticeresults entity)
 {
     row.SetField("firstnm", entity.firstnm);
     row.SetField("lastnm", entity.lastnm);
     row.SetField("email", entity.email);
     row.SetField("contactid", entity.contactid);
     row.SetField("lselect", entity.lselect);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Emailforshipnoticeresults BuildEmailforshipnoticeresultsFromRow(DataRow row)
        {
            Emailforshipnoticeresults entity = new Emailforshipnoticeresults();

            entity.firstnm   = row.IsNull("firstnm") ? string.Empty : row.Field <string>("firstnm");
            entity.lastnm    = row.IsNull("lastnm") ? string.Empty : row.Field <string>("lastnm");
            entity.email     = row.IsNull("email") ? string.Empty : row.Field <string>("email");
            entity.contactid = row.IsNull("contactid") ? decimal.Zero : row.Field <decimal>("contactid");
            entity.lselect   = row.Field <bool>("lselect");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }