/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromMenusecuritymenu(ref DataRow row, Menusecuritymenu entity) { row.SetField("functionname", entity.functionname); row.SetField("menutitle", entity.menutitle); row.SetField("parentmenu", entity.parentmenu); row.SetField("parentpos", entity.parentpos); row.SetField("moduleresource", entity.moduleresource); row.SetField("securitylevel", entity.securitylevel); }
public static Menusecuritymenu BuildMenusecuritymenuFromRow(DataRow row) { Menusecuritymenu entity = new Menusecuritymenu(); 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.moduleresource = row.IsNull("moduleresource") ? string.Empty : row.Field <string>("moduleresource"); entity.securitylevel = row.IsNull("securitylevel") ? 0 : row.Field <int>("securitylevel"); return(entity); }