Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcseglookupcriteria(ref DataRow row, Icseglookupcriteria entity)
 {
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("accttype", entity.accttype);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("whse", entity.whse);
     row.SetField("custtype", entity.custtype);
     row.SetField("salesrep", entity.salesrep);
     row.SetField("cogsadj", entity.cogsadj);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Icseglookupcriteria BuildIcseglookupcriteriaFromRow(DataRow row)
        {
            Icseglookupcriteria entity = new Icseglookupcriteria();

            entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.accttype    = row.Field <bool>("accttype");
            entity.prodcat     = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custtype    = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.salesrep    = row.IsNull("salesrep") ? string.Empty : row.Field <string>("salesrep");
            entity.cogsadj     = row.IsNull("cogsadj") ? string.Empty : row.Field <string>("cogsadj");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }