Exemple #1
0
        /// <summary>
        /// 获取考勤异常上报页面数据源
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public TableModel GetExcptionUpSoure(object obj)
        {
            FormCollection param  = (FormCollection)obj;
            int            rows   = int.Parse(param["rows"]);
            int            page   = int.Parse(param["page"]);
            TableModel     model  = new TableModel();
            string         UnitID = param["UnitID"];

            if (string.IsNullOrEmpty(UnitID))
            {
                var dataUnit = new B01BLL().GetPerUnitByUserID(HCQ2UI_Helper.OperateContext.Current.Usr.user_id);
                UnitID = string.Join("','", dataUnit.Select(o => o.UnitID));
            }

            List <View_A02> attList = DBSession.IView_A02DAL.GetAttendsByUnit("'" + UnitID + "'");

            if (!string.IsNullOrEmpty(param["txtSreachName"]))
            {
                string txtName = param["txtSreachName"];
                attList = attList.Where(o => o.A0101.Contains(txtName)).ToList();
            }

            model.total = attList.Count();
            model.rows  = attList.Skip((rows * page) - rows).Take(rows);

            return(model);
        }
Exemple #2
0
        /// <summary>
        /// 获取页面显示的数据源
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public TableModel GetPageViewSoure(object obj)
        {
            FormCollection      param      = (FormCollection)obj;
            int                 rows       = int.Parse(param["rows"]);
            int                 page       = int.Parse(param["page"]);
            int                 user_id    = HCQ2UI_Helper.OperateContext.Current.Usr.user_id;
            List <B01>          unitList   = new B01BLL().GetPerUnitByUserID(user_id);
            string              unitidInfo = "'" + string.Join("','", unitList.Select(o => o.UnitID)) + "'";
            List <T_PayAccount> payList    = new List <T_PayAccount>();

            StringBuilder sbSql = new StringBuilder();

            sbSql.AppendFormat("select * from T_PayAccount where if_remove=0 and UnitID in ({0}) ", unitidInfo);

            if (!string.IsNullOrEmpty(param["bank_name"]))
            {
                sbSql.AppendFormat(" and khh like '{0}' ", param["bank_name"]);
            }
            DataTable dt = HCQ2_Common.SQL.SqlHelper.ExecuteDataTable(sbSql.ToString());

            payList = HCQ2_Common.Data.DataTableHelper.DataTableToIList <T_PayAccount>(dt);
            TableModel model = new TableModel();

            model.rows  = payList.Skip((rows * page) - rows).Take(rows);
            model.total = payList.Count();
            return(model);
        }
Exemple #3
0
        /// <summary>
        /// 根据用户ID获取所分配权限项目的所有征信记录
        /// </summary>
        /// <param name="user_id"></param>
        /// <returns></returns>
        public List <T_EnterDetail> GetEnterByUserid(int user_id)
        {
            StringBuilder sbSql    = new StringBuilder();
            List <B01>    unitList = new B01BLL().GetPerUnitByUserID(user_id);
            string        strUnit  = "'" + string.Join("','", unitList.Select(o => o.UnitID)) + "'";

            sbSql.AppendFormat("select b.* from  ( select * from T_CompProInfo where com_id in");
            sbSql.AppendFormat(" ( select in_compay from b01 where UnitID in ({0})))a ", strUnit);
            sbSql.AppendFormat(" inner join T_EnterDetail b on a.com_id=b.ent_id where b.is_success=0 and b.solve_type=0 ");
            sbSql.AppendFormat(" union all ");
            sbSql.AppendFormat(" select b.* from  ( select * from T_CompProInfo where QXLB<>'01' and QXLB<>'02')a ");
            sbSql.AppendFormat(" inner join T_EnterDetail b on a.com_id=b.ent_id where b.is_success=0 and b.solve_type=0 ");
            return(HCQ2_Common.Data.DataTableHelper.DataTableToIList <T_EnterDetail>(
                       HCQ2_Common.SQL.SqlHelper.ExecuteDataTable(sbSql.ToString())));
        }