Exemplo n.º 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);
    }
Exemplo n.º 2
0
    public void GetAccess(int AccessType, int GroupCode, int MasterCode)
    {
        int ResourceCode;
        UsersDataContext dataContext = new UsersDataContext();
        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);
        }
    }
Exemplo n.º 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 <vUserLogs>(string.Format("exec spGetPaged '{0}','{1}','{2}','{3}',N'{4}'", TableOrViewName, SortString, PageSize, CurrentPage, WhereCond));
        DataTable dt         = new Converter <vUserLogs>().ToDataTable(ListResult);

        return(dt);
    }