示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromMenusecuritytop(ref DataRow row, Menusecuritytop entity)
 {
     row.SetField("functionname", entity.functionname);
     row.SetField("menutitle", entity.menutitle);
     row.SetField("parentpos", entity.parentpos);
     row.SetField("commandparameter", entity.commandparameter);
     row.SetField("commandtype", entity.commandtype);
     row.SetField("moduleresource", entity.moduleresource);
     row.SetField("securitylevel", entity.securitylevel);
 }
示例#2
0
        public static Menusecuritytop BuildMenusecuritytopFromRow(DataRow row)
        {
            Menusecuritytop entity = new Menusecuritytop();

            entity.functionname     = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.menutitle        = row.IsNull("menutitle") ? string.Empty : row.Field <string>("menutitle");
            entity.parentpos        = row.IsNull("parentpos") ? 0 : row.Field <int>("parentpos");
            entity.commandparameter = row.IsNull("commandparameter") ? string.Empty : row.Field <string>("commandparameter");
            entity.commandtype      = row.IsNull("commandtype") ? 0 : row.Field <int>("commandtype");
            entity.moduleresource   = row.IsNull("moduleresource") ? string.Empty : row.Field <string>("moduleresource");
            entity.securitylevel    = row.IsNull("securitylevel") ? 0 : row.Field <int>("securitylevel");
            return(entity);
        }