Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaheadersettings(ref DataRow row, Vaheadersettings entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("operinit", entity.operinit);
     row.SetField("vaheaderty", entity.vaheaderty);
     row.SetField("sortby", entity.sortby);
     row.SetField("lnonstockfl", entity.lnonstockfl);
     row.SetField("homewhsefl", entity.homewhsefl);
     row.SetField("homewhse", entity.homewhse);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Vaheadersettings BuildVaheadersettingsFromRow(DataRow row)
        {
            Vaheadersettings entity = new Vaheadersettings();

            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.operinit    = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.vaheaderty  = row.IsNull("vaheaderty") ? string.Empty : row.Field <string>("vaheaderty");
            entity.sortby      = row.IsNull("sortby") ? 0 : row.Field <int>("sortby");
            entity.lnonstockfl = row.Field <bool>("lnonstockfl");
            entity.homewhsefl  = row.Field <bool>("homewhsefl");
            entity.homewhse    = row.IsNull("homewhse") ? string.Empty : row.Field <string>("homewhse");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }