Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsrlookupcriteria(ref DataRow row, Icsrlookupcriteria entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("whse", entity.whse);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodline", entity.prodline);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Icsrlookupcriteria BuildIcsrlookupcriteriaFromRow(DataRow row)
        {
            Icsrlookupcriteria entity = new Icsrlookupcriteria();

            entity.recordtype = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodline   = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }