コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromMenusecurityfunction(ref DataRow row, Menusecurityfunction entity)
 {
     row.SetField("functionname", entity.functionname);
     row.SetField("menutitle", entity.menutitle);
     row.SetField("parentmenu", entity.parentmenu);
     row.SetField("parentpos", entity.parentpos);
     row.SetField("commandparameter", entity.commandparameter);
     row.SetField("commandtype", entity.commandtype);
     row.SetField("moduleresource", entity.moduleresource);
     row.SetField("drilldown", entity.drilldown);
     row.SetField("securitylevel", entity.securitylevel);
     row.SetField("subsecuritylevels", entity.subsecuritylevels);
     row.SetField("subsecurityresource", entity.subsecurityresource);
 }
コード例 #2
0
        public static Menusecurityfunction BuildMenusecurityfunctionFromRow(DataRow row)
        {
            Menusecurityfunction entity = new Menusecurityfunction();

            entity.functionname        = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.menutitle           = row.IsNull("menutitle") ? string.Empty : row.Field <string>("menutitle");
            entity.parentmenu          = row.IsNull("parentmenu") ? string.Empty : row.Field <string>("parentmenu");
            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.drilldown           = row.IsNull("drilldown") ? string.Empty : row.Field <string>("drilldown");
            entity.securitylevel       = row.IsNull("securitylevel") ? 0 : row.Field <int>("securitylevel");
            entity.subsecuritylevels   = row.IsNull("subsecuritylevels") ? string.Empty : row.Field <string>("subsecuritylevels");
            entity.subsecurityresource = row.IsNull("subsecurityresource") ? string.Empty : row.Field <string>("subsecurityresource");
            return(entity);
        }