Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadusagecriteria(ref DataRow row, Loadusagecriteria entity)
 {
     row.SetField("reportno", entity.reportno);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("unit", entity.unit);
     row.SetField("secure", entity.secure);
     row.SetField("customparam", entity.customparam);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Loadusagecriteria BuildLoadusagecriteriaFromRow(DataRow row)
        {
            Loadusagecriteria entity = new Loadusagecriteria();

            entity.reportno    = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.secure      = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }