コード例 #1
0
 /// <summary>
 /// 查询市区管理
 /// </summary>
 public void SearchData()
 {
     try
     {
         Search search       = this.GetSearch();
         string ProvinceCode = (Request["ProvinceCode"] == null ? "" : Request["ProvinceCode"]);
         if (!string.IsNullOrEmpty(ProvinceCode) && ProvinceCode != "-1")
         {
             search.AddCondition("ProvinceCode='" + ProvinceCode + "'");
         }
         WriteJsonToPage(new BllSysHatcity().SearchData(search));
     }
     catch (Exception ex)
     {
         LogErrorRecord.Info("查询列表:" + ex);
     }
 }
コード例 #2
0
        /// <summary>
        /// 查询上级单位
        /// </summary>
        public void SearchParentIndex()
        {
            try
            {
                Search search = this.GetSearch();
                search.AddCondition("CId='" + CurrentMaster.Cid + "'");
                search.AddCondition("SelectType=2");//上级单位管理的

                LogInsert(OperationTypeEnum.访问, "关联单位模块", "访问页面成功.");
                WriteJsonToPage(Bll.SearchData(search));
            }
            catch (Exception ex)
            {
                LogErrorRecord.Info("查询列表:" + ex);
                LogInsert(OperationTypeEnum.异常, "关联单位模块", "查询列表错误消息:" + ex.Message.ToString());
            }
        }
コード例 #3
0
        /// <summary>
        /// 根据id 加载数据
        /// </summary>
        public void SearchData()
        {
            try
            {
                Search search = this.GetSearch();
                search.AddCondition("ResponsibleId='" + CurrentMaster.Id + "'");//自己查看自己的

                LogInsert(OperationTypeEnum.访问, "设备巡检模块", "访问页面成功.");

                WriteJsonToPage(new BllSysQRCode().SearchData(search));
            }
            catch (Exception ex)
            {
                LogErrorRecord.Info("查询列表:" + ex);
                LogInsert(OperationTypeEnum.异常, "设备巡检模块", "查询列表错误消息:" + ex.Message.ToString());
            }
        }
コード例 #4
0
 /// <summary>
 /// 查询岗位管理
 /// </summary>
 public void SearchData()
 {
     try
     {
         Search search = this.GetSearch();
         search.AddCondition("Attribute=" + (int)CompanyType.消防部门);
         if (!CurrentMaster.IsMain)
         {
             if (CurrentMaster.LookPower == (int)LookPowerEnum.查看自建)
             {
                 search.AddCondition("CreaterUserId='" + CurrentMaster.Id + "'");//自己查看自己的
             }
         }
         WriteJsonToPage(bll.SearchData(search));
     }
     catch (Exception ex)
     {
         LogErrorRecord.Info("查询列表:" + ex);
     }
 }
コード例 #5
0
ファイル: ChartController.cs プロジェクト: chrgu000/bellali
        /// <summary>
        /// 超期未巡检列表统计
        /// </summary>
        public void SuperParentData()
        {
            try
            {
                BllSysAppointed Bll    = new BllSysAppointed();
                Search          search = this.GetSearch();
                if (Request["Id"].ToString() != "-1")
                {
                    search.AddCondition("Cid='" + Request["Id"].ToString() + "'");
                }
                else
                {
                    search.AddCondition("Cid in (select EmployerId from Sys_CompanyCognate where Cid='" + CurrentMaster.Cid + "' and Status=1 and SelectType=2)");
                }

                string searchType = Request["searchType"].ToString();
                switch (int.Parse(searchType))
                {
                case 1:    //全部
                    break;

                case 2:    //本月
                    search.AddCondition("datediff(month,MaintenanceDate,getdate())=0");
                    break;

                case 3:    //上月
                    search.AddCondition("datediff(month,MaintenanceDate,getdate())=1");
                    break;
                }
                search.AddCondition("MaintenanceDate<getDate()");

                LogInsert(OperationTypeEnum.访问, "超期未巡检列表统计模块", "访问页面成功.");
                WriteJsonToPage(Bll.SearchData(search));
            }
            catch (Exception ex)
            {
                LogErrorRecord.Info("查询列表:" + ex);
                LogInsert(OperationTypeEnum.异常, "超期未巡检列表统计模块", "查询列表错误消息:" + ex.Message.ToString());
            }
        }
コード例 #6
0
 /// <summary>
 /// 弹框根据加载数据
 /// </summary>
 public void SearchViewData()
 {
     try
     {
         Search search = this.GetSearch();
         search.AddCondition("Status=" + (int)StatusEnum.禁用);
         string CompanyId = Request["CompanyId"].ToString().Trim();//
         if (CompanyId != "")
         {
             search.AddCondition("SysId='" + CompanyId + "'");
         }
         else
         {
             search.AddCondition("SysId='" + CurrentMaster.Cid + "'");
         }
         WriteJsonToPage(new BllSysQRCode().SearchData(search));
     }
     catch (Exception ex)
     {
         LogErrorRecord.Info("查询列表:" + ex);
     }
 }