Пример #1
0
        public byte[] OutFileStandingBookList(string strOrgType, string strOwnerId, DateTime dtStart, DateTime dtEnd, string strSortKey, string strFilter, List <object> objArgs)
        {
            List <V_StandingBook> entStandingBookList = new List <V_StandingBook>();
            BudgetCheckDAL        dalBudgetCheck      = new BudgetCheckDAL();
            string strOrderBy = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "StandingBook");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entStandingBookList = dalBudgetCheck.GetStandingBookByMultSearch(strOrgType, dtStart, dtEnd, strOrderBy, strFilter, objArgs.ToArray());

            DataTable dt       = MakeTableToExportStandingBook();
            DataTable dtExport = GetExportDataForStandingBook(dt, entStandingBookList);

            return(Utility.OutFileStream("预算台帐列表", dtExport));
        }
Пример #2
0
        /// <summary>
        /// 根据部门ID及其组织架构类型返回该部门下的所有科目类型
        /// </summary>
        /// <param name="strOwnerID"></param>
        /// <param name="strOrgId"></param>
        /// <param name="strModelCode"></param>
        /// <param name="entRes"></param>
        private void GetSubjectByDeptment(string strOwnerID, string strOrgId, string strModelCode, ref List <T_FB_SUBJECT> entResList)
        {
            SubjectDAL dalSubject = new SubjectDAL();
            decimal    dActived   = 1;
            var        ents       = from v in dalSubject.GetObjects <T_FB_SUBJECTDEPTMENT>().Include("T_FB_SUBJECT")
                                    where v.ACTIVED == dActived && v.OWNERDEPARTMENTID == strOrgId
                                    select v;

            string        filterString = string.Empty;
            List <object> objArgs      = new List <object>();

            SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
            ul.SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_FB_SUBJECTDEPTMENT");

            if (ents == null)
            {
                return;
            }

            if (ents.Count() == 0)
            {
                return;
            }

            var res = ents.Select(t => t.T_FB_SUBJECT);

            if (res == null)
            {
                return;
            }

            entResList = res.ToList();
        }
Пример #3
0
        public byte[] OutFileYearlyBudgetAnalysisList(string strOrgType, string strOwnerId, int iYear, int iMonthStart,
                                                      int iMonthEnd, string strSortKey, string strFilter, List <object> objArgs)
        {
            List <V_YearlyBudgetAnalysis> entYearlyAnalysisList = new List <V_YearlyBudgetAnalysis>();
            BudgetCheckDAL dalBudgetCheck = new BudgetCheckDAL();
            string         strOrderBy     = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "YearlyBudgetAnalysis");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entYearlyAnalysisList = dalBudgetCheck.GetYearlyBudgetAnalysisByMultSearch(strOrgType, iYear, iMonthStart, iMonthEnd, strOrderBy, strFilter, objArgs.ToArray());

            DataTable dt       = MakeTableToExportYearlyAnalysis();
            DataTable dtExport = GetExportDataForYearlyAnalysis(dt, entYearlyAnalysisList);

            return(Utility.OutFileStream("年度预算分析列表", dtExport));
        }
Пример #4
0
        /// <summary>
        /// 预算台帐查询分页
        /// </summary>
        /// <param name="strOrgType"></param>
        /// <param name="strOwnerId"></param>
        /// <param name="dtStart"></param>
        /// <param name="dtEnd"></param>
        /// <param name="strSortKey"></param>
        /// <param name="strFilter"></param>
        /// <param name="objArgs"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public List <V_StandingBook> GetStandingBookByMultSearch(string strOrgType, string strOwnerId, DateTime dtStart, DateTime dtEnd, string strSortKey,
                                                                 string strFilter, List <object> objArgs, int pageIndex, int pageSize, ref int pageCount)
        {
            List <V_StandingBook> entStandingBookList = new List <V_StandingBook>();
            BudgetCheckDAL        dalBudgetCheck      = new BudgetCheckDAL();
            string strOrderBy = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "StandingBook");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entStandingBookList = dalBudgetCheck.GetStandingBookByMultSearch(strOrgType, dtStart, dtEnd, strOrderBy, strFilter, objArgs.ToArray());
            return(Utility.PagerList <V_StandingBook>(entStandingBookList, pageIndex, pageSize, ref pageCount));
        }
Пример #5
0
        /// <summary>
        /// 预算月度预算分析分页
        /// </summary>
        /// <param name="strOrgType"></param>
        /// <param name="strOwnerId"></param>
        /// <param name="strOrgID"></param>
        /// <param name="iYear"></param>
        /// <param name="iMonth"></param>
        /// <param name="strSortKey"></param>
        /// <param name="strFilter"></param>
        /// <param name="objArgs"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public List <V_MonthlyBudgetAnalysis> GetMonthlyBudgetAnalysisByMultSearch(string strOrgType, string strOwnerId, int iYear, int iMonth,
                                                                                   string strSortKey, string strFilter, List <object> objArgs, int pageIndex, int pageSize, ref int pageCount)
        {
            List <V_MonthlyBudgetAnalysis> entMonthlyAnalysisList = new List <V_MonthlyBudgetAnalysis>();
            BudgetCheckDAL dalBudgetCheck = new BudgetCheckDAL();
            string         strOrderBy     = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "MonthlyBudgetAnalysis");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entMonthlyAnalysisList = dalBudgetCheck.GetMonthlyBudgetAnalysisByMultSearch(strOrgType, iYear, iMonth, strOrderBy, strFilter, objArgs.ToArray());
            return(Utility.PagerList <V_MonthlyBudgetAnalysis>(entMonthlyAnalysisList, pageIndex, pageSize, ref pageCount));
        }
Пример #6
0
        /// <summary>
        /// 根据查询条件,获取还款信息(主要用于查询分页)
        /// </summary>
        /// <param name="strOwnerID">查询人的员工ID</param>
        /// <param name="strDateStart">查询起始时间</param>
        /// <param name="strDateEnd">查询截止时间</param>
        /// <param name="strCheckState">查询审核状态</param>
        /// <param name="strFilter">查询条件</param>
        /// <param name="objArgs">查询参数</param>
        /// <param name="strOrderBy">strSortKey</param>
        /// <returns></returns>
        public static IQueryable <T_FB_REPAYAPPLYMASTER> GetAllRepayApplyMasterRdListByMultSearch(string strOwnerID, string strDateStart,
                                                                                                  string strDateEnd, string strCheckState, string strFilter, List <object> objArgs, string strSortKey)
        {
            try
            {
                RepayApplyMasterDAL dalRepay = new RepayApplyMasterDAL();
                string strOrderBy            = string.Empty;

                if (string.IsNullOrWhiteSpace(strOwnerID) || string.IsNullOrWhiteSpace(strCheckState))
                {
                    return(null);
                }

                if (!string.IsNullOrEmpty(strSortKey))
                {
                    strOrderBy = strSortKey;
                }
                else
                {
                    strOrderBy = " REPAYAPPLYMASTERID ";
                }

                SMT.SaaS.BLLCommonServices.Utility ulFoo = new SaaS.BLLCommonServices.Utility();
                if (strCheckState != Convert.ToInt32(FBAEnums.CheckStates.WaittingApproval).ToString())
                {
                    ulFoo.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerID, "T_FB_REPAYAPPLYMASTER");
                }
                else
                {
                    string StrOld = "";
                    StrOld = strFilter;//将过滤前的字符串付给再比较
                    ulFoo.SetFilterWithflow("REPAYAPPLYMASTERID", "T_FB_REPAYAPPLYMASTER", strOwnerID, ref strCheckState, ref strFilter, ref objArgs);
                    if (StrOld.Equals(strFilter))
                    {
                        return(null);
                    }
                    strCheckState = Convert.ToInt32(FBAEnums.CheckStates.Approving).ToString();
                }

                if (strCheckState == Convert.ToInt32(FBAEnums.CheckStates.All).ToString())
                {
                    strCheckState = string.Empty;
                }

                var ents = dalRepay.GetRepayApplyMasterRdListByMultSearch(strCheckState, strDateStart, strDateEnd, strOrderBy, strFilter, objArgs.ToArray());
                return(ents);
            }
            catch (Exception ex)
            {
                Utility.SaveLog(DateTime.Now.ToString() + "调用函数GetAllRepayApplyMasterRdListByMultSearch出错, 查询人的员工ID为:" + strOwnerID + ",错误信息为:" + ex.ToString());
            }

            return(null);
        }
Пример #7
0
        /// <summary>
        /// 获取所有 SUBJECT。
        /// </summary>
        /// <returns>返回结果列表。</returns>
        public IQueryable <T_FB_SUBJECT> GetAllSubject(string strOwnerID)
        {
            SubjectDAL dalSubject = new SubjectDAL();

            string        filterString = string.Empty;
            List <object> objArgs      = new List <object>();

            if (!string.IsNullOrEmpty(strOwnerID))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_FB_SUBJECT");
            }

            return(dalSubject.GetAllSubject());
        }
Пример #8
0
        /// <summary>
        /// 根据部门ID及其组织架构类型返回该部门下的所有科目类型
        /// </summary>
        /// <param name="strOwnerID"></param>
        /// <param name="strOrgId"></param>
        /// <param name="strModelCode"></param>
        /// <param name="entRes"></param>
        private void GetSubjectByDeptment(string strOwnerID, string strOrgId, string strModelCode, ref List<T_FB_SUBJECT> entResList)
        {
            SubjectDAL dalSubject = new SubjectDAL();
            decimal dActived = 1;
            var ents = from v in dalSubject.GetObjects<T_FB_SUBJECTDEPTMENT>().Include("T_FB_SUBJECT")
                       where v.ACTIVED == dActived && v.OWNERDEPARTMENTID == strOrgId
                       select v;

            string filterString = string.Empty;
            List<object> objArgs = new List<object>();

            SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
            ul.SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_FB_SUBJECTDEPTMENT");

            if (ents == null)
            {
                return;
            }

            if (ents.Count() == 0)
            {
                return;
            }

            var res = ents.Select(t => t.T_FB_SUBJECT);

            if (res == null)
            {
                return;
            }

            entResList = res.ToList();
        }
Пример #9
0
        /// <summary>
        /// 获取所有 SUBJECT。
        /// </summary>
        /// <returns>返回结果列表。</returns>
        public IQueryable<T_FB_SUBJECT> GetAllSubject(string strOwnerID)
        {
            SubjectDAL dalSubject = new SubjectDAL();

            string filterString = string.Empty;
            List<object> objArgs = new List<object>();

            if (!string.IsNullOrEmpty(strOwnerID))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_FB_SUBJECT");
            }

            return dalSubject.GetAllSubject();
        }
Пример #10
0
        public byte[] OutFileYearlyBudgetAnalysisList(string strOrgType, string strOwnerId, int iYear, int iMonthStart,
            int iMonthEnd, string strSortKey, string strFilter, List<object> objArgs)
        {
            List<V_YearlyBudgetAnalysis> entYearlyAnalysisList = new List<V_YearlyBudgetAnalysis>();
            BudgetCheckDAL dalBudgetCheck = new BudgetCheckDAL();
            string strOrderBy = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "YearlyBudgetAnalysis");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entYearlyAnalysisList = dalBudgetCheck.GetYearlyBudgetAnalysisByMultSearch(strOrgType, iYear, iMonthStart, iMonthEnd, strOrderBy, strFilter, objArgs.ToArray());

            DataTable dt = MakeTableToExportYearlyAnalysis();
            DataTable dtExport = GetExportDataForYearlyAnalysis(dt, entYearlyAnalysisList);

            return Utility.OutFileStream("年度预算分析列表", dtExport);
        }
Пример #11
0
        public byte[] OutFileStandingBookList(string strOrgType, string strOwnerId, DateTime dtStart, DateTime dtEnd, string strSortKey, string strFilter, List<object> objArgs)
        {
            List<V_StandingBook> entStandingBookList = new List<V_StandingBook>();
            BudgetCheckDAL dalBudgetCheck = new BudgetCheckDAL();
            string strOrderBy = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "StandingBook");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entStandingBookList = dalBudgetCheck.GetStandingBookByMultSearch(strOrgType, dtStart, dtEnd, strOrderBy, strFilter, objArgs.ToArray());

            DataTable dt = MakeTableToExportStandingBook();
            DataTable dtExport = GetExportDataForStandingBook(dt, entStandingBookList);

            return Utility.OutFileStream("预算台帐列表", dtExport);
        }
Пример #12
0
        /// <summary>
        /// 预算月度预算分析分页
        /// </summary>
        /// <param name="strOrgType"></param>
        /// <param name="strOwnerId"></param>
        /// <param name="strOrgID"></param>
        /// <param name="iYear"></param>
        /// <param name="iMonth"></param>
        /// <param name="strSortKey"></param>
        /// <param name="strFilter"></param>
        /// <param name="objArgs"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public List<V_MonthlyBudgetAnalysis> GetMonthlyBudgetAnalysisByMultSearch(string strOrgType, string strOwnerId, int iYear, int iMonth,
            string strSortKey, string strFilter, List<object> objArgs, int pageIndex, int pageSize, ref int pageCount)
        {
            List<V_MonthlyBudgetAnalysis> entMonthlyAnalysisList = new List<V_MonthlyBudgetAnalysis>();
            BudgetCheckDAL dalBudgetCheck = new BudgetCheckDAL();
            string strOrderBy = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "MonthlyBudgetAnalysis");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entMonthlyAnalysisList = dalBudgetCheck.GetMonthlyBudgetAnalysisByMultSearch(strOrgType, iYear, iMonth, strOrderBy, strFilter, objArgs.ToArray());
            return Utility.PagerList<V_MonthlyBudgetAnalysis>(entMonthlyAnalysisList, pageIndex, pageSize, ref pageCount);
        }
Пример #13
0
        /// <summary>
        /// 预算台帐查询分页
        /// </summary>
        /// <param name="strOrgType"></param>
        /// <param name="strOwnerId"></param>
        /// <param name="dtStart"></param>
        /// <param name="dtEnd"></param>
        /// <param name="strSortKey"></param>
        /// <param name="strFilter"></param>
        /// <param name="objArgs"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public List<V_StandingBook> GetStandingBookByMultSearch(string strOrgType, string strOwnerId, DateTime dtStart, DateTime dtEnd, string strSortKey,
            string strFilter, List<object> objArgs, int pageIndex, int pageSize, ref int pageCount)
        {
            List<V_StandingBook> entStandingBookList = new List<V_StandingBook>();
            BudgetCheckDAL dalBudgetCheck = new BudgetCheckDAL();
            string strOrderBy = string.Empty;

            if (!string.IsNullOrWhiteSpace(strOwnerId))
            {
                SMT.SaaS.BLLCommonServices.Utility ul = new SaaS.BLLCommonServices.Utility();
                ul.SetOrganizationFilter(ref strFilter, ref objArgs, strOwnerId, "StandingBook");
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = "SUBJECTID";
            }

            entStandingBookList = dalBudgetCheck.GetStandingBookByMultSearch(strOrgType, dtStart, dtEnd, strOrderBy, strFilter, objArgs.ToArray());
            return Utility.PagerList<V_StandingBook>(entStandingBookList, pageIndex, pageSize, ref pageCount);
        }