Exemplo n.º 1
0
        /// <summary>
        /// Returns a new SecurityFunctionDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual SecurityFunctionDetails GetSecurityFunctionFromReader(DbDataReader reader)
        {
            SecurityFunctionDetails securityFunction = new SecurityFunctionDetails();

            if (reader.HasRows)
            {
                securityFunction.SecurityFunctionId = GetReaderValue_Int32(reader, "SecurityFunctionId", 0);                                 //From: [Table]
                securityFunction.FunctionName       = GetReaderValue_String(reader, "FunctionName", "");                                     //From: [Table]
                securityFunction.Description        = GetReaderValue_String(reader, "Description", "");                                      //From: [Table]
                securityFunction.SitePageNo         = GetReaderValue_NullableInt32(reader, "SitePageNo", null);                              //From: [Table]
                securityFunction.SiteSectionNo      = GetReaderValue_NullableInt32(reader, "SiteSectionNo", null);                           //From: [Table]
                securityFunction.ReportNo           = GetReaderValue_NullableInt32(reader, "ReportNo", null);                                //From: [Table]
                securityFunction.UpdatedBy          = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                               //From: [Table]
                securityFunction.DLUP = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);                                          //From: [Table]
                securityFunction.InitiallyProhibitedForNewLogins = GetReaderValue_Boolean(reader, "InitiallyProhibitedForNewLogins", false); //From: [Table]
                securityFunction.DisplaySortOrder        = GetReaderValue_NullableInt32(reader, "DisplaySortOrder", null);                   //From: [Table]
                securityFunction.IsAllowed               = GetReaderValue_NullableBoolean(reader, "IsAllowed", null);                        //From: [usp_select_SecurityFunction_Permission_by_Login]
                securityFunction.ReportId                = GetReaderValue_Int32(reader, "ReportId", 0);                                      //From: [Table]
                securityFunction.ReportName              = GetReaderValue_String(reader, "ReportName", "");                                  //From: [Table]
                securityFunction.ReportCategoryName      = GetReaderValue_String(reader, "ReportCategoryName", "");                          //From: [usp_select_Report]
                securityFunction.ReportCategoryGroupName = GetReaderValue_String(reader, "ReportCategoryGroupName", "");                     //From: [usp_select_Report]
                securityFunction.SiteSectionName         = GetReaderValue_String(reader, "SiteSectionName", "");                             //From: [usp_selectAll_SecurityFunction_Section]
            }
            return(securityFunction);
        }
Exemplo n.º 2
0
 /// <summary>
 /// GetReportPermissionForLogin
 /// Calls [usp_select_SecurityFunction_Report_Permission_for_Login]
 /// </summary>
 public static SecurityFunction GetReportPermissionForLogin(System.Int32?loginNo, System.Int32?reportNo)
 {
     Rebound.GlobalTrader.DAL.SecurityFunctionDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SecurityFunction.GetReportPermissionForLogin(loginNo, reportNo);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         SecurityFunction obj = new SecurityFunction();
         obj.IsAllowed = objDetails.IsAllowed;
         objDetails    = null;
         return(obj);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// CheckAdminPermissionsByLogin
 /// Calls [usp_check_admin_Permissions_by_Login]
 /// </summary>
 public static SecurityFunction CheckAdminPermissionsByLogin(System.Int32?loginNo)
 {
     Rebound.GlobalTrader.DAL.SecurityFunctionDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SecurityFunction.CheckAdminPermissionsByLogin(loginNo);
     if (objDetails == null)
     {
         return(new SecurityFunction());
     }
     else
     {
         SecurityFunction obj = new SecurityFunction();
         //obj.SecurityFunctionId = objDetails.SecurityFunctionId;
         obj.IsAllowed = objDetails.IsAllowed;
         objDetails    = null;
         return(obj);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// GetBySitePage
 /// Calls [usp_select_SecurityFunction_by_SitePage]
 /// </summary>
 public static SecurityFunction GetBySitePage(System.Int32?sitePageNo)
 {
     Rebound.GlobalTrader.DAL.SecurityFunctionDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SecurityFunction.GetBySitePage(sitePageNo);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         SecurityFunction obj = new SecurityFunction();
         obj.SecurityFunctionId = objDetails.SecurityFunctionId;
         obj.FunctionName       = objDetails.FunctionName;
         obj.Description        = objDetails.Description;
         obj.SitePageNo         = objDetails.SitePageNo;
         obj.SiteSectionNo      = objDetails.SiteSectionNo;
         obj.ReportNo           = objDetails.ReportNo;
         obj.UpdatedBy          = objDetails.UpdatedBy;
         obj.DLUP = objDetails.DLUP;
         obj.InitiallyProhibitedForNewLogins = objDetails.InitiallyProhibitedForNewLogins;
         obj.DisplaySortOrder = objDetails.DisplaySortOrder;
         objDetails           = null;
         return(obj);
     }
 }