示例#1
0
    DataTable IBaseBOL.GetDataSource(SearchFilterCollection sFilterCols, string SortString, int PageSize, int CurrentPage)
    {
        string    WhereCond  = Tools.GetCondition(sFilterCols);
        var       ListResult = dataContext.ExecuteQuery <vGroupResources>(string.Format("exec spGetPaged '{0}','{1}','{2}','{3}',N'{4}'", TableOrViewName, SortString, PageSize, CurrentPage, WhereCond));
        DataTable dt         = new Converter <vGroupResources>().ToDataTable(ListResult);

        return(dt);
    }
示例#2
0
    public void GetAccess(int AccessType, int GroupCode, int MasterCode)
    {
        int ResourceCode;
        AccessLevelDataContext dataContext = new AccessLevelDataContext();
        var Result     = dataContext.sp_GetMultipleAccess(AccessType, GroupCode, MasterCode);
        var ListResult = dataContext.ExecuteQuery <GroupResources>(string.Format("exec sp_GetMultipleAccess '{0}','{1}','{2}'", AccessType, GroupCode, MasterCode));

        foreach (var r in ListResult)
        {
            ResourceCode = (int)((GroupResources)r).ResourceCode;
            GetAccess(AccessType, GroupCode, ResourceCode);
        }
    }
示例#3
0
    DataTable IBaseBOL.GetDataSource(SearchFilterCollection sFilterCols, string SortString, int PageSize, int CurrentPage)
    {
        string WhereCond;

        WhereCond = Tools.GetCondition(sFilterCols);
        if (WhereCond == "")
        {
            WhereCond = " UserCode = " + MasterCode;
        }
        else
        {
            WhereCond = " UserCode = " + MasterCode + " and " + WhereCond;
        }

        var       ListResult = dataContext.ExecuteQuery <vForgotPasswords>(string.Format("exec spGetPaged '{0}','{1}','{2}','{3}','{4}'", TableOrViewName, SortString, PageSize, CurrentPage, WhereCond));
        DataTable dt         = new Converter <vForgotPasswords>().ToDataTable(ListResult);

        return(dt);
    }