Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="doCount"></param>
        public DataSet QueryRepairList(Model.WeChat.RepairListDto dto, out int doCount)
        {
            doCount = 0;
            string strSql = string.Format(@"select a.ServiceSer,b.ClassName,a.ContactPerson,a.ContactTel,a.Address,a.ServiceNote,a.Picture1,a.Picture2,a.Picture3,a.Memo,
case a.Sign when -1 then '禁用' when 0 then '未受理' when 1 then '已派工' when 3 then '已关闭' end as SignName,a.ServiceID
,a.TodayDate,
case a.ISFeedback when 1 then '电话反馈' else '不反馈' end as ISFeedbackName,a.ServiceFee
from hou_service_info a
inner join sys_class_para b on b.ClassID=a.ClassID and a.AreaID=b.AreaID
where a.AreaID='{0}' ", dto.AreaID);

            if (!string.IsNullOrEmpty(dto.ServiceSer))
            {
                strSql += " and a.ServiceSer Like '%" + dto.ServiceSer + "%'";
            }
            if (!string.IsNullOrEmpty(dto.CreateTimeS))
            {
                strSql += " and a.TodayDate >= '" + dto.CreateTimeS + "'";
            }
            if (!string.IsNullOrEmpty(dto.CreateTimeE))
            {
                strSql += " and a.TodayDate <= '" + dto.CreateTimeE + "'";
            }
            if (!string.IsNullOrEmpty(dto.ServiceNote))
            {
                strSql += " and a.ServiceNote like '" + dto.ServiceNote + "%' ";
            }
            if (dto.Sign != null)
            {
                strSql += " and a.Sign='" + dto.Sign + "' ";
            }

            SqlParameter[] sqlParameter =
            {
                new SqlParameter("@sSQL",      SqlDbType.VarChar, 2000),
                new SqlParameter("@PageSize",  SqlDbType.Int),
                new SqlParameter("@PageIndex", SqlDbType.Int),
                new SqlParameter("@doCount",   SqlDbType.Int),
                new SqlParameter("@sOrder",    SqlDbType.VarChar,  300),
            };
            sqlParameter[0].Value     = strSql;
            sqlParameter[1].Value     = dto.PageSize;
            sqlParameter[2].Value     = dto.PageIndex;
            sqlParameter[3].Direction = ParameterDirection.Output;
            sqlParameter[4].Value     = "a.ServiceID";

            DataSet ds = sqlHelper.RunProcedure("P_SqlPagerAll", sqlParameter, "QueryHouServiceInfo");

            if (!string.IsNullOrEmpty(sqlParameter[3].Value.ToString()))
            {
                doCount = Convert.ToInt32(sqlParameter[3].Value.ToString());
            }

            return(ds);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="repairDto"></param>
        /// <param name="doCount"></param>
        public DataTable QueryRepairList(Model.WeChat.RepairListDto repairDto, out int doCount)
        {
            DataTable dt = new DataTable();
            DataSet   ds = dal.QueryRepairList(repairDto, out doCount);

            if (ds != null && ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
            }
            return(dt);
        }
Exemple #3
0
        public ResInfo QueryRepairList(Model.WeChat.RepairListDto RepairDto)
        {
            int rows = 0;

            BLL.WeChat.Repair bll        = new BLL.WeChat.Repair(connStr);
            DataTable         dt         = bll.QueryRepairList(RepairDto, out rows);
            ResDataDto        resDataDto = new ResDataDto();

            resDataDto.Rows    = dt;
            resDataDto.Records = rows;
            resInfo.ResData    = resDataDto;
            return(resInfo);
        }