/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext contenxt = HttpContext.Current; HttpRequest request = contenxt.Request; HttpResponse response = contenxt.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string userName = request.Params["textUserName"]; string realName = request.Params["textRealName"]; string beginAddTime = request.Params["textBeginAddTime"]; string endAddTime = request.Params["textEndAddTime"]; string onlineFlagId = request.Params["selectOnlineFlag"]; CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName = typeof(SystemUser).FullName; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.OrderList.Add(new Order("SU.AddTime", false)); if (!String.IsNullOrEmpty(userName)) systemUserCriterionAndOrder.CriterionList.Add(Restrictions.Like("SU.UserName", "%" + userName + "%")); if (!String.IsNullOrEmpty(realName)) systemUserCriterionAndOrder.CriterionList.Add(Restrictions.Like("SU.RealName", "%" + realName + "%")); if (!String.IsNullOrEmpty(beginAddTime)) systemUserCriterionAndOrder.CriterionList.Add(Restrictions.Gt("SU.AddTime", Convert.ToDateTime(beginAddTime))); if (!String.IsNullOrEmpty(endAddTime)) systemUserCriterionAndOrder.CriterionList.Add(Restrictions.Lt("SU.AddTime", Convert.ToDateTime(endAddTime))); if (!String.IsNullOrEmpty(onlineFlagId)) systemUserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SU.OnlineFlagId", Convert.ToChar(onlineFlagId))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("SU.GenderName").As("GenderName")); pList.Add(Projections.Property("SU.OnlineFlagName").As("OnlineFlagName")); pList.Add(Projections.Property("SU.UserId").As("UserId")); pList.Add(Projections.Property("SU.UserId").As("PrimaryKey")); pList.Add(Projections.Property("SU.UserName").As("UserName")); pList.Add(Projections.Property("SU.RealName").As("RealName")); pList.Add(Projections.Property("SU.AddTime").As("AddTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(SystemUser); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = SystemUserBll.GetSystemUserList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string fartherId = request.Params["selectFartherId"]; string name = request.Params["textName"]; string officeLevel = request.Params["selectOfficeLevel"]; CriterionAndOrder hospitalSectionOfficeCriterionAndOrder = new CriterionAndOrder(); hospitalSectionOfficeCriterionAndOrder.CriteriaName = typeof(HospitalSectionOffice).FullName; hospitalSectionOfficeCriterionAndOrder.CriteriaAsName = "HSO"; hospitalSectionOfficeCriterionAndOrder.OrderList.Add(new Order("HSO.OfficeLevel", true)); hospitalSectionOfficeCriterionAndOrder.OrderList.Add(new Order("HSO.Name", true)); if (!String.IsNullOrEmpty(fartherId)) hospitalSectionOfficeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("HSO.FartherId", fartherId)); if (!String.IsNullOrEmpty(name)) hospitalSectionOfficeCriterionAndOrder.CriterionList.Add(Restrictions.Like("HSO.Name", "%" + name + "%")); if (!String.IsNullOrEmpty(officeLevel)) hospitalSectionOfficeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("HSO.OfficeLevel", officeLevel)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("HSO.SectOffId").As("PrimaryKey")); pList.Add(Projections.Property("HSO.AddTime").As("AddTime")); pList.Add(Projections.Property("HSO.FartherId").As("FartherId")); pList.Add(Projections.Property("HSO.Name").As("Name")); pList.Add(Projections.Property("HSO.OfficeLevel").As("OfficeLevel")); pList.Add(Projections.Property("HSO.SectOffId").As("SectOffId")); pList.Add(Projections.Property("HSO.OfficeLevelName").As("OfficeLevelName")); pList.Add(Projections.Property("HSO.FartherIdName").As("FartherIdName")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(HospitalSectionOffice); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(hospitalSectionOfficeCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = HospitalSectionOfficeBll.GetHospitalSectionOfficeList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string chiefComplaint=request.Params["textChiefComplaint"]; string confirmedDiagnostic=request.Params["textConfirmedDiagnostic"]; string consumerId=request.Params["textConsumerId"]; string description=request.Params["textDescription"]; string historyPresentIllness=request.Params["textHistoryPresentIllness"]; string inHospitalDiagnostic=request.Params["textInHospitalDiagnostic"]; string phyExamNum=request.Params["textPhyExamNum"]; string physicalExam=request.Params["textPhysicalExam"]; string physicalExamDate=request.Params["textPhysicalExamDate"]; string recordId=request.Params["textRecordId"]; string representor=request.Params["textRepresentor"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder medicalRecordCriterionAndOrder = new CriterionAndOrder(); medicalRecordCriterionAndOrder.CriteriaName = typeof(MedicalRecord).FullName; medicalRecordCriterionAndOrder.CriteriaAsName = "MR"; medicalRecordCriterionAndOrder.OrderList.Add(new Order("MR.AddTime", false)); CriterionAndOrder consumerCriterionAndOrder = new CriterionAndOrder(); consumerCriterionAndOrder.CriteriaName ="ConsumerRef" ; consumerCriterionAndOrder.CriteriaAsName = "C"; consumerCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(chiefComplaint)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.ChiefComplaint", chiefComplaint)); if (!String.IsNullOrEmpty(confirmedDiagnostic)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.ConfirmedDiagnostic", confirmedDiagnostic)); if (!String.IsNullOrEmpty(consumerId)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.ConsumerId", consumerId)); if (!String.IsNullOrEmpty(description)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.Description", description)); if (!String.IsNullOrEmpty(historyPresentIllness)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.HistoryPresentIllness", historyPresentIllness)); if (!String.IsNullOrEmpty(inHospitalDiagnostic)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.InHospitalDiagnostic", inHospitalDiagnostic)); if (!String.IsNullOrEmpty(phyExamNum)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.PhyExamNum", phyExamNum)); if (!String.IsNullOrEmpty(physicalExam)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.PhysicalExam", physicalExam)); if (!String.IsNullOrEmpty(physicalExamDate)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.PhysicalExamDate", Convert.ToDateTime(physicalExamDate))); if (!String.IsNullOrEmpty(recordId)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.RecordId", recordId)); if (!String.IsNullOrEmpty(representor)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.Representor", representor)); if (!String.IsNullOrEmpty(updateTime)) medicalRecordCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MR.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("MR.RecordId").As("PrimaryKey")); pList.Add(Projections.Property("MR.AddTime").As("AddTime")); pList.Add(Projections.Property("MR.ChiefComplaint").As("ChiefComplaint")); pList.Add(Projections.Property("MR.ConfirmedDiagnostic").As("ConfirmedDiagnostic")); pList.Add(Projections.Property("C.ConsumerId").As("ConsumerId")); pList.Add(Projections.Property("MR.Description").As("Description")); pList.Add(Projections.Property("MR.HistoryPresentIllness").As("HistoryPresentIllness")); pList.Add(Projections.Property("MR.InHospitalDiagnostic").As("InHospitalDiagnostic")); pList.Add(Projections.Property("MR.PhyExamNum").As("PhyExamNum")); pList.Add(Projections.Property("MR.PhysicalExam").As("PhysicalExam")); pList.Add(Projections.Property("MR.PhysicalExamDate").As("PhysicalExamDate")); pList.Add(Projections.Property("MR.RecordId").As("RecordId")); pList.Add(Projections.Property("MR.Representor").As("Representor")); pList.Add(Projections.Property("MR.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(MedicalRecord); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(medicalRecordCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(consumerCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = MedicalRecordBll.GetMedicalRecordList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string userName = request.Params["textUserName"]; string realName = request.Params["textRealName"]; string medCardNum = request.Params["textMedCardNum"]; string memCardNum = request.Params["textMemCardNumber"]; CriterionAndOrder consumerCriterionAndOrder = new CriterionAndOrder(); consumerCriterionAndOrder.CriteriaName = typeof(Consumer).FullName; consumerCriterionAndOrder.CriteriaAsName = "C"; consumerCriterionAndOrder.OrderList.Add(new Order("C.ConsumerId", false)); CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName = "UserRef"; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder cardUserListCriterionAndOrder = new CriterionAndOrder(); cardUserListCriterionAndOrder.CriteriaName = "CardUserList"; cardUserListCriterionAndOrder.CriteriaAsName = "CUL"; cardUserListCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(userName)) consumerCriterionAndOrder.CriterionList.Add(Restrictions.Like("SU.UserName", "%" + userName + "%")); if (!String.IsNullOrEmpty(realName)) consumerCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RealName", "%" + realName + "%")); if (!String.IsNullOrEmpty(memCardNum)) consumerCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CUL.CardNum", memCardNum)); if (!String.IsNullOrEmpty(medCardNum)) consumerCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.MedCardNum", medCardNum)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("C.ConsumerId").As("PrimaryKey")); //pList.Add(Projections.Property("C.ConsumerId").As("ConsumerId")); pList.Add(Projections.Property("C.MedCardNum").As("MedCardNum")); pList.Add(Projections.Property("SU.UserName").As("UserName")); pList.Add(Projections.Property("SU.RealName").As("RealName")); pList.Add(Projections.Property("SU.GenderName").As("GenderName")); pList.Add(Projections.Property("SU.AddTime").As("AddTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(Consumer); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(consumerCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConsumerBll.GetConsumerList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string conLogId=request.Params["textConLogId"]; string durationTime=request.Params["textDurationTime"]; string loginTime=request.Params["textLoginTime"]; string logoutTime=request.Params["textLogoutTime"]; string userId=request.Params["textUserId"]; CriterionAndOrder conLogCriterionAndOrder = new CriterionAndOrder(); conLogCriterionAndOrder.CriteriaName = typeof(ConLog).FullName; conLogCriterionAndOrder.CriteriaAsName = "CL"; conLogCriterionAndOrder.OrderList.Add(new Order("CL.ConLogId", false)); CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName ="UserRef" ; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(conLogId)) conLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.ConLogId", conLogId)); if (!String.IsNullOrEmpty(durationTime)) conLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.DurationTime", durationTime)); if (!String.IsNullOrEmpty(loginTime)) conLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.LoginTime", Convert.ToDateTime(loginTime))); if (!String.IsNullOrEmpty(logoutTime)) conLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.LogoutTime", Convert.ToDateTime(logoutTime))); if (!String.IsNullOrEmpty(userId)) conLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.UserId", userId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("CL.ConLogId").As("PrimaryKey")); pList.Add(Projections.Property("CL.ConLogId").As("ConLogId")); pList.Add(Projections.Property("CL.DurationTime").As("DurationTime")); pList.Add(Projections.Property("CL.LoginTime").As("LoginTime")); pList.Add(Projections.Property("CL.LogoutTime").As("LogoutTime")); pList.Add(Projections.Property("SU.UserId").As("UserId")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(ConLog); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(conLogCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConLogBll.GetConLogList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string actualDoctorId=request.Params["textActualDoctorId"]; string actualDoctorId2=request.Params["textActualDoctorId2"]; string actualDoctorId3=request.Params["textActualDoctorId3"]; string actualDoctorId4=request.Params["textActualDoctorId4"]; string addTime=request.Params["textAddTime"]; string arrangeConTime=request.Params["textArrangeConTime"]; string beginConTime=request.Params["textBeginConTime"]; string callerId=request.Params["textCallerId"]; string cancelConResult=request.Params["textCancelConResult"]; string chargeType=request.Params["textChargeType"]; string conFile=request.Params["textConFile"]; string conObjective=request.Params["textConObjective"]; string consulationMode=request.Params["textConsulationMode"]; string consulationType=request.Params["textConsulationType"]; string consultationId=request.Params["textConsultationId"]; string consultationStatus=request.Params["textConsultationStatus"]; string description=request.Params["textDescription"]; string diagnosis=request.Params["textDiagnosis"]; string diagnosisFile=request.Params["textDiagnosisFile"]; string endConTime=request.Params["textEndConTime"]; string itemId=request.Params["textItemId"]; string notPassResult=request.Params["textNotPassResult"]; string processRequestTime=request.Params["textProcessRequestTime"]; string receiverId=request.Params["textReceiverId"]; string requestDoctorId=request.Params["textRequestDoctorId"]; string requestDoctorId2=request.Params["textRequestDoctorId2"]; string requestDoctorId3=request.Params["textRequestDoctorId3"]; string requestDoctorId4=request.Params["textRequestDoctorId4"]; string requestTime=request.Params["textRequestTime"]; string roomId=request.Params["textRoomId"]; string sectionOfficeId=request.Params["textSectionOfficeId"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder consultationCriterionAndOrder = new CriterionAndOrder(); consultationCriterionAndOrder.CriteriaName = typeof(Consultation).FullName; consultationCriterionAndOrder.CriteriaAsName = "C"; consultationCriterionAndOrder.OrderList.Add(new Order("C.AddTime", false)); CriterionAndOrder serviceItemCriterionAndOrder = new CriterionAndOrder(); serviceItemCriterionAndOrder.CriteriaName ="ItemRef" ; serviceItemCriterionAndOrder.CriteriaAsName = "SI"; serviceItemCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder consultationRoomCriterionAndOrder = new CriterionAndOrder(); consultationRoomCriterionAndOrder.CriteriaName ="RoomRef" ; consultationRoomCriterionAndOrder.CriteriaAsName = "CR"; consultationRoomCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(actualDoctorId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualDoctorId", actualDoctorId)); if (!String.IsNullOrEmpty(actualDoctorId2)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualDoctorId2", actualDoctorId2)); if (!String.IsNullOrEmpty(actualDoctorId3)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualDoctorId3", actualDoctorId3)); if (!String.IsNullOrEmpty(actualDoctorId4)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualDoctorId4", actualDoctorId4)); if (!String.IsNullOrEmpty(addTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(arrangeConTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ArrangeConTime", Convert.ToDateTime(arrangeConTime))); if (!String.IsNullOrEmpty(beginConTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.BeginConTime", Convert.ToDateTime(beginConTime))); if (!String.IsNullOrEmpty(callerId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.CallerId", callerId)); if (!String.IsNullOrEmpty(cancelConResult)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.CancelConResult", cancelConResult)); if (!String.IsNullOrEmpty(chargeType)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ChargeType", chargeType)); if (!String.IsNullOrEmpty(conFile)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConFile", conFile)); if (!String.IsNullOrEmpty(conObjective)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConObjective", conObjective)); if (!String.IsNullOrEmpty(consulationMode)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConsulationMode", consulationMode)); if (!String.IsNullOrEmpty(consulationType)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConsulationType", consulationType)); if (!String.IsNullOrEmpty(consultationId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConsultationId", consultationId)); if (!String.IsNullOrEmpty(consultationStatus)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConsultationStatus", consultationStatus)); if (!String.IsNullOrEmpty(description)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.Description", description)); if (!String.IsNullOrEmpty(diagnosis)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.Diagnosis", diagnosis)); if (!String.IsNullOrEmpty(diagnosisFile)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.DiagnosisFile", diagnosisFile)); if (!String.IsNullOrEmpty(endConTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.EndConTime", Convert.ToDateTime(endConTime))); if (!String.IsNullOrEmpty(itemId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ItemId", itemId)); if (!String.IsNullOrEmpty(notPassResult)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.NotPassResult", notPassResult)); if (!String.IsNullOrEmpty(processRequestTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ProcessRequestTime", Convert.ToDateTime(processRequestTime))); if (!String.IsNullOrEmpty(receiverId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ReceiverId", receiverId)); if (!String.IsNullOrEmpty(requestDoctorId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RequestDoctorId", requestDoctorId)); if (!String.IsNullOrEmpty(requestDoctorId2)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RequestDoctorId2", requestDoctorId2)); if (!String.IsNullOrEmpty(requestDoctorId3)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RequestDoctorId3", requestDoctorId3)); if (!String.IsNullOrEmpty(requestDoctorId4)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RequestDoctorId4", requestDoctorId4)); if (!String.IsNullOrEmpty(requestTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RequestTime", Convert.ToDateTime(requestTime))); if (!String.IsNullOrEmpty(roomId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.RoomId", roomId)); if (!String.IsNullOrEmpty(sectionOfficeId)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.SectionOfficeId", sectionOfficeId)); if (!String.IsNullOrEmpty(updateTime)) consultationCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("C.ConsultationId").As("PrimaryKey")); pList.Add(Projections.Property("C.ActualDoctorId").As("ActualDoctorId")); pList.Add(Projections.Property("C.ActualDoctorId2").As("ActualDoctorId2")); pList.Add(Projections.Property("C.ActualDoctorId3").As("ActualDoctorId3")); pList.Add(Projections.Property("C.ActualDoctorId4").As("ActualDoctorId4")); pList.Add(Projections.Property("C.AddTime").As("AddTime")); pList.Add(Projections.Property("C.ArrangeConTime").As("ArrangeConTime")); pList.Add(Projections.Property("C.BeginConTime").As("BeginConTime")); pList.Add(Projections.Property("C.CallerId").As("CallerId")); pList.Add(Projections.Property("C.CancelConResult").As("CancelConResult")); pList.Add(Projections.Property("C.ChargeType").As("ChargeType")); pList.Add(Projections.Property("C.ConFile").As("ConFile")); pList.Add(Projections.Property("C.ConObjective").As("ConObjective")); pList.Add(Projections.Property("C.ConsulationMode").As("ConsulationMode")); pList.Add(Projections.Property("C.ConsulationType").As("ConsulationType")); pList.Add(Projections.Property("C.ConsultationId").As("ConsultationId")); pList.Add(Projections.Property("C.ConsultationStatus").As("ConsultationStatus")); pList.Add(Projections.Property("C.Description").As("Description")); pList.Add(Projections.Property("C.Diagnosis").As("Diagnosis")); pList.Add(Projections.Property("C.DiagnosisFile").As("DiagnosisFile")); pList.Add(Projections.Property("C.EndConTime").As("EndConTime")); pList.Add(Projections.Property("SI.ItemId").As("ItemId")); pList.Add(Projections.Property("C.NotPassResult").As("NotPassResult")); pList.Add(Projections.Property("C.ProcessRequestTime").As("ProcessRequestTime")); pList.Add(Projections.Property("C.ReceiverId").As("ReceiverId")); pList.Add(Projections.Property("C.RequestDoctorId").As("RequestDoctorId")); pList.Add(Projections.Property("C.RequestDoctorId2").As("RequestDoctorId2")); pList.Add(Projections.Property("C.RequestDoctorId3").As("RequestDoctorId3")); pList.Add(Projections.Property("C.RequestDoctorId4").As("RequestDoctorId4")); pList.Add(Projections.Property("C.RequestTime").As("RequestTime")); pList.Add(Projections.Property("CR.RoomId").As("RoomId")); pList.Add(Projections.Property("C.SectionOfficeId").As("SectionOfficeId")); pList.Add(Projections.Property("C.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(Consultation); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(consultationCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(serviceItemCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(consultationRoomCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConsultationBll.GetConsultationList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string cardId=request.Params["textCardId"]; string cardTypeId=request.Params["textCardTypeId"]; string description=request.Params["textDescription"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder membershipCardCriterionAndOrder = new CriterionAndOrder(); membershipCardCriterionAndOrder.CriteriaName = typeof(MembershipCard).FullName; membershipCardCriterionAndOrder.CriteriaAsName = "MC"; membershipCardCriterionAndOrder.OrderList.Add(new Order("MC.AddTime", false)); CriterionAndOrder cardTypeCriterionAndOrder = new CriterionAndOrder(); cardTypeCriterionAndOrder.CriteriaName ="CardTypeRef" ; cardTypeCriterionAndOrder.CriteriaAsName = "CT"; cardTypeCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) membershipCardCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MC.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(cardId)) membershipCardCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MC.CardId", cardId)); if (!String.IsNullOrEmpty(cardTypeId)) membershipCardCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MC.CardTypeId", cardTypeId)); if (!String.IsNullOrEmpty(description)) membershipCardCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MC.Description", description)); if (!String.IsNullOrEmpty(updateTime)) membershipCardCriterionAndOrder.CriterionList.Add(Restrictions.Eq("MC.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("MC.CardId").As("PrimaryKey")); pList.Add(Projections.Property("MC.AddTime").As("AddTime")); pList.Add(Projections.Property("MC.CardId").As("CardId")); pList.Add(Projections.Property("CT.CardTypeId").As("CardTypeId")); pList.Add(Projections.Property("MC.Description").As("Description")); pList.Add(Projections.Property("MC.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(MembershipCard); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(membershipCardCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(cardTypeCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = MembershipCardBll.GetMembershipCardList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 根据角色查询相应功能模块 /// </summary> protected void GetModuleListByRole() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string roleId= request.Params["roleId"]; CriterionAndOrder moduleCriterionAndOrder = new CriterionAndOrder(); moduleCriterionAndOrder.CriteriaName = typeof(FunctionModule).FullName; moduleCriterionAndOrder.CriteriaAsName = "FE"; CriterionAndOrder roleCriterionAndOrder = new CriterionAndOrder(); roleCriterionAndOrder.CriteriaName = "Role"; roleCriterionAndOrder.CriteriaAsName = "RO"; roleCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.InnerJoin; if (!String.IsNullOrEmpty(roleId)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("RO.RoleId", roleId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("FE.ModuleId").As("ModuleId")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(FunctionModule); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(moduleCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(roleCriterionAndOrder); ResultModel result = FunctionModuleBll.GetFunctionModuleList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime = request.Params["textAddTime"]; string description = request.Params["textDescription"]; string isPublic = request.Params["textIsPublic"]; string moduleId = request.Params["textModuleId"]; string moduleLevelId = request.Params["selectModuleLevelId"]; string moduleName = request.Params["textModuleName"]; string fartherId = request.Params["selectFartherId"]; string sortFieldId = request.Params["textSortFieldId"]; string order = request.Params["order"]; CriterionAndOrder moduleCriterionAndOrder = new CriterionAndOrder(); moduleCriterionAndOrder.CriteriaName = typeof(FunctionModule).FullName; moduleCriterionAndOrder.CriteriaAsName = "FM"; if (!String.IsNullOrEmpty(order)) moduleCriterionAndOrder.OrderList.Add(new Order(order, false)); else moduleCriterionAndOrder.OrderList.Add(new Order("FM.SortFieldId", true)); CriterionAndOrder fartherCriterionAndOrder = new CriterionAndOrder(); fartherCriterionAndOrder.CriteriaName = "FartherRef"; fartherCriterionAndOrder.CriteriaAsName = "PF"; fartherCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; fartherCriterionAndOrder.OrderList.Add(new Order("PF.SortFieldId", true)); if (!String.IsNullOrEmpty(addTime)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.AddTime", addTime)); if (!String.IsNullOrEmpty(description)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.Description", description)); if (!String.IsNullOrEmpty(isPublic)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.IsPublicId", isPublic)); if (!String.IsNullOrEmpty(moduleId)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.ModuleId", moduleId)); if (!String.IsNullOrEmpty(moduleLevelId)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.ModuleLevelId", Convert.ToInt32(moduleLevelId))); if (!String.IsNullOrEmpty(moduleName)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Like("FM.ModuleName", "%" + moduleName + "%")); if (!String.IsNullOrEmpty(fartherId)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.FartherId", fartherId)); if (!String.IsNullOrEmpty(sortFieldId)) moduleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.SortFieldId", sortFieldId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("FM.ModuleId").As("ModuleId")); pList.Add(Projections.Property("FM.ModuleId").As("PrimaryKey")); pList.Add(Projections.Property("FM.ModuleName").As("ModuleName")); pList.Add(Projections.Property("FM.UpdateTime").As("UpdateTime")); pList.Add(Projections.Property("FM.AddTime").As("AddTime")); pList.Add(Projections.Property("FM.ModuleLevelId").As("ModuleLevelId")); pList.Add(Projections.Property("FM.ModuleLevelName").As("ModuleLevelName")); pList.Add(Projections.Property("PF.ModuleId").As("FartherId")); pList.Add(Projections.Property("PF.ModuleName").As("FartherName")); pList.Add(Projections.Property("FM.SortFieldId").As("SortFieldId")); pList.Add(Projections.Property("FM.SortFieldName").As("SortFieldName")); pList.Add(Projections.Property("FM.IsPublicId").As("IsPublicId")); pList.Add(Projections.Property("FM.IsPublicName").As("IsPublicName")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(FunctionModule); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(moduleCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(fartherCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = FunctionModuleBll.GetFunctionModuleList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string consultationId=request.Params["textConsultationId"]; string imageId=request.Params["textImageId"]; CriterionAndOrder consultationDigitalImageCriterionAndOrder = new CriterionAndOrder(); consultationDigitalImageCriterionAndOrder.CriteriaName = typeof(ConsultationDigitalImage).FullName; consultationDigitalImageCriterionAndOrder.CriteriaAsName = "CDI"; consultationDigitalImageCriterionAndOrder.OrderList.Add(new Order("CDI.AddTime", false)); CriterionAndOrder consultationCriterionAndOrder = new CriterionAndOrder(); consultationCriterionAndOrder.CriteriaName ="ConsultationRef" ; consultationCriterionAndOrder.CriteriaAsName = "C"; consultationCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder digitalImageCriterionAndOrder = new CriterionAndOrder(); digitalImageCriterionAndOrder.CriteriaName ="ImageRef" ; digitalImageCriterionAndOrder.CriteriaAsName = "DI"; digitalImageCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) consultationDigitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CDI.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(consultationId)) consultationDigitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CDI.ConsultationId", consultationId)); if (!String.IsNullOrEmpty(imageId)) consultationDigitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CDI.ImageId", imageId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("CDI.AddTime").As("AddTime")); pList.Add(Projections.Property("C.ConsultationId").As("ConsultationId")); pList.Add(Projections.Property("DI.ImageId").As("ImageId")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(ConsultationDigitalImage); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(consultationDigitalImageCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(consultationCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(digitalImageCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConsultationDigitalImageBll.GetConsultationDigitalImageList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string description=request.Params["textDescription"]; string fartherId=request.Params["textFartherId"]; string itemId=request.Params["textItemId"]; string level=request.Params["textLevel"]; string name=request.Params["textName"]; string serialNumber=request.Params["textSerialNumber"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder serviceItemCriterionAndOrder = new CriterionAndOrder(); serviceItemCriterionAndOrder.CriteriaName = typeof(ServiceItem).FullName; serviceItemCriterionAndOrder.CriteriaAsName = "SI"; serviceItemCriterionAndOrder.OrderList.Add(new Order("SI.AddTime", false)); CriterionAndOrder serviceItemCriterionAndOrder = new CriterionAndOrder(); serviceItemCriterionAndOrder.CriteriaName ="FartherRef" ; serviceItemCriterionAndOrder.CriteriaAsName = "SI_FI"; serviceItemCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(description)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.Description", description)); if (!String.IsNullOrEmpty(fartherId)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.FartherId", fartherId)); if (!String.IsNullOrEmpty(itemId)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.ItemId", itemId)); if (!String.IsNullOrEmpty(level)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.Level", level)); if (!String.IsNullOrEmpty(name)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.Name", name)); if (!String.IsNullOrEmpty(serialNumber)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.SerialNumber", serialNumber)); if (!String.IsNullOrEmpty(updateTime)) serviceItemCriterionAndOrder.CriterionList.Add(Restrictions.Eq("SI.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("SI.ItemId").As("PrimaryKey")); pList.Add(Projections.Property("SI.AddTime").As("AddTime")); pList.Add(Projections.Property("SI.Description").As("Description")); pList.Add(Projections.Property("SI_FI.ItemId").As("FartherId")); pList.Add(Projections.Property("SI.ItemId").As("ItemId")); pList.Add(Projections.Property("SI.Level").As("Level")); pList.Add(Projections.Property("SI.Name").As("Name")); pList.Add(Projections.Property("SI.SerialNumber").As("SerialNumber")); pList.Add(Projections.Property("SI.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(ServiceItem); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(serviceItemCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(serviceItemCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ServiceItemBll.GetServiceItemList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string roleId=request.Params["textRoleId"]; string userId=request.Params["textUserId"]; CriterionAndOrder userRoleCriterionAndOrder = new CriterionAndOrder(); userRoleCriterionAndOrder.CriteriaName = typeof(UserRole).FullName; userRoleCriterionAndOrder.CriteriaAsName = "UR"; userRoleCriterionAndOrder.OrderList.Add(new Order("UR.AddTime", false)); CriterionAndOrder roleCriterionAndOrder = new CriterionAndOrder(); roleCriterionAndOrder.CriteriaName ="RoleRef" ; roleCriterionAndOrder.CriteriaAsName = "R"; roleCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName ="UserRef" ; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) userRoleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("UR.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(roleId)) userRoleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("UR.RoleId", roleId)); if (!String.IsNullOrEmpty(userId)) userRoleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("UR.UserId", userId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("UR.AddTime").As("AddTime")); pList.Add(Projections.Property("R.RoleId").As("RoleId")); pList.Add(Projections.Property("SU.UserId").As("UserId")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(UserRole); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(userRoleCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(roleCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = UserRoleBll.GetUserRoleList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string expertName = request.Params["textExpertName"]; string sectOffId = request.Params["selectSectOffId"]; string fartherId = request.Params["selectFartherId"]; CriterionAndOrder hospitalExpertCriterionAndOrder = new CriterionAndOrder(); hospitalExpertCriterionAndOrder.CriteriaName = typeof(HospitalExpert).FullName; hospitalExpertCriterionAndOrder.CriteriaAsName = "HE"; hospitalExpertCriterionAndOrder.OrderList.Add(new Order("HE.ExpertId", false)); CriterionAndOrder hospitalSectionOfficeCriterionAndOrder = new CriterionAndOrder(); hospitalSectionOfficeCriterionAndOrder.CriteriaName = "SectOffRef"; hospitalSectionOfficeCriterionAndOrder.CriteriaAsName = "HSO"; hospitalSectionOfficeCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName = "UserRef"; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(expertName)) hospitalExpertCriterionAndOrder.CriterionList.Add(Restrictions.Like("SU.UserName", "%" + expertName + "%")); if (!String.IsNullOrEmpty(sectOffId)) hospitalExpertCriterionAndOrder.CriterionList.Add(Restrictions.Eq("HE.SectOffId", sectOffId)); if (!String.IsNullOrEmpty(fartherId)) hospitalExpertCriterionAndOrder.CriterionList.Add(Restrictions.Eq("HSO.FartherId", fartherId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("HE.ExpertId").As("PrimaryKey")); pList.Add(Projections.Property("HE.ExpertId").As("ExpertId")); pList.Add(Projections.Property("HSO.Name").As("SectOffName")); pList.Add(Projections.Property("SU.UserName").As("UserName")); pList.Add(Projections.Property("SU.AddTime").As("AddTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(HospitalExpert); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(hospitalExpertCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(hospitalSectionOfficeCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = HospitalExpertBll.GetHospitalExpertList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string description=request.Params["textDescription"]; string DeviceType=request.Params["textDeviceType"]; string ip=request.Params["textIp"]; string name=request.Params["textName"]; string roomId=request.Params["textRoomId"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder consultationRoomCriterionAndOrder = new CriterionAndOrder(); consultationRoomCriterionAndOrder.CriteriaName = typeof(ConsultationRoom).FullName; consultationRoomCriterionAndOrder.CriteriaAsName = "CR"; consultationRoomCriterionAndOrder.OrderList.Add(new Order("CR.AddTime", false)); if (!String.IsNullOrEmpty(addTime)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(description)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.Description", description)); if (!String.IsNullOrEmpty(DeviceType)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.DeviceType", DeviceType)); if (!String.IsNullOrEmpty(ip)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.Ip", ip)); if (!String.IsNullOrEmpty(name)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.Name", name)); if (!String.IsNullOrEmpty(roomId)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.RoomId", roomId)); if (!String.IsNullOrEmpty(updateTime)) consultationRoomCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CR.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("CR.RoomId").As("PrimaryKey")); pList.Add(Projections.Property("CR.AddTime").As("AddTime")); pList.Add(Projections.Property("CR.Description").As("Description")); pList.Add(Projections.Property("CR.DeviceType").As("DeviceType")); pList.Add(Projections.Property("CR.Ip").As("Ip")); pList.Add(Projections.Property("CR.Name").As("Name")); pList.Add(Projections.Property("CR.RoomId").As("RoomId")); pList.Add(Projections.Property("CR.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(ConsultationRoom); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(consultationRoomCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConsultationRoomBll.GetConsultationRoomList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string cardTypeId=request.Params["textCardTypeId"]; string description=request.Params["textDescription"]; string expense=request.Params["textExpense"]; string name=request.Params["textName"]; string updateTime=request.Params["textUpdateTime"]; string validityDate=request.Params["textValidityDate"]; string validityTime=request.Params["textValidityTime"]; CriterionAndOrder cardTypeCriterionAndOrder = new CriterionAndOrder(); cardTypeCriterionAndOrder.CriteriaName = typeof(CardType).FullName; cardTypeCriterionAndOrder.CriteriaAsName = "CT"; cardTypeCriterionAndOrder.OrderList.Add(new Order("CT.AddTime", false)); if (!String.IsNullOrEmpty(addTime)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(cardTypeId)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.CardTypeId", cardTypeId)); if (!String.IsNullOrEmpty(description)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.Description", description)); if (!String.IsNullOrEmpty(expense)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.Expense", expense)); if (!String.IsNullOrEmpty(name)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.Name", name)); if (!String.IsNullOrEmpty(updateTime)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.UpdateTime", Convert.ToDateTime(updateTime))); if (!String.IsNullOrEmpty(validityDate)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.ValidityDate", Convert.ToDateTime(validityDate))); if (!String.IsNullOrEmpty(validityTime)) cardTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CT.ValidityTime", validityTime)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("CT.CardTypeId").As("PrimaryKey")); pList.Add(Projections.Property("CT.AddTime").As("AddTime")); pList.Add(Projections.Property("CT.CardTypeId").As("CardTypeId")); pList.Add(Projections.Property("CT.Description").As("Description")); pList.Add(Projections.Property("CT.Expense").As("Expense")); pList.Add(Projections.Property("CT.Name").As("Name")); pList.Add(Projections.Property("CT.UpdateTime").As("UpdateTime")); pList.Add(Projections.Property("CT.ValidityDate").As("ValidityDate")); pList.Add(Projections.Property("CT.ValidityTime").As("ValidityTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(CardType); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(cardTypeCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = CardTypeBll.GetCardTypeList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string moduleId=request.Params["textModuleId"]; string pageId=request.Params["textPageId"]; CriterionAndOrder functionPageCriterionAndOrder = new CriterionAndOrder(); functionPageCriterionAndOrder.CriteriaName = typeof(FunctionPage).FullName; functionPageCriterionAndOrder.CriteriaAsName = "FP"; functionPageCriterionAndOrder.OrderList.Add(new Order("FP.AddTime", false)); CriterionAndOrder functionModuleCriterionAndOrder = new CriterionAndOrder(); functionModuleCriterionAndOrder.CriteriaName ="ModuleRef" ; functionModuleCriterionAndOrder.CriteriaAsName = "FM"; functionModuleCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder webPageCriterionAndOrder = new CriterionAndOrder(); webPageCriterionAndOrder.CriteriaName ="PageRef" ; webPageCriterionAndOrder.CriteriaAsName = "WP"; webPageCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) functionPageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FP.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(moduleId)) functionPageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FP.ModuleId", moduleId)); if (!String.IsNullOrEmpty(pageId)) functionPageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FP.PageId", pageId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("FP.AddTime").As("AddTime")); pList.Add(Projections.Property("FM.ModuleId").As("ModuleId")); pList.Add(Projections.Property("WP.PageId").As("PageId")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(FunctionPage); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(functionPageCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(functionModuleCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(webPageCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = FunctionPageBll.GetFunctionPageList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime = request.Params["textAddTime"]; string description = request.Params["textDescription"]; string id = request.Params["textId"]; string name = request.Params["textName"]; string updateTime = request.Params["textUpdateTime"]; //keywords是处理AutoComplete下接框查询时设置的传入参数 string keywords = request.Params["keywords"]; CriterionAndOrder dictionaryTypeCriterionAndOrder = new CriterionAndOrder(); dictionaryTypeCriterionAndOrder.CriteriaName = typeof(DictionaryType).FullName; dictionaryTypeCriterionAndOrder.CriteriaAsName = "DT"; dictionaryTypeCriterionAndOrder.OrderList.Add(new Order("DT.AddTime", false)); if (!String.IsNullOrEmpty(addTime)) dictionaryTypeCriterionAndOrder.CriterionList.Add(Restrictions.Gt("DT.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(description)) dictionaryTypeCriterionAndOrder.CriterionList.Add(Restrictions.Like("DT.Description", "%" + description + "%")); if (!String.IsNullOrEmpty(keywords)) dictionaryTypeCriterionAndOrder.CriterionList.Add(Restrictions.Like("DT.Description", "%" + keywords + "%")); if (!String.IsNullOrEmpty(id)) dictionaryTypeCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DT.DictTypeId", id)); if (!String.IsNullOrEmpty(name)) dictionaryTypeCriterionAndOrder.CriterionList.Add(Restrictions.Like("DT.Name", "%" + name + "%")); if (!String.IsNullOrEmpty(updateTime)) dictionaryTypeCriterionAndOrder.CriterionList.Add(Restrictions.Gt("DT.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("DT.DictTypeId").As("PrimaryKey")); pList.Add(Projections.Property("DT.AddTime").As("AddTime")); pList.Add(Projections.Property("DT.Description").As("Description")); pList.Add(Projections.Property("DT.DictTypeId").As("DictTypeId")); pList.Add(Projections.Property("DT.Name").As("Name")); pList.Add(Projections.Property("DT.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(DictionaryType); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(dictionaryTypeCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = DictionaryTypeBll.GetDictionaryTypeList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string beginAddTime = request.Params["textBeginAddTime"]; string endAddTime = request.Params["textEndAddTime"]; string isSuccessId = request.Params["textIsSuccessId"]; string operationTable = request.Params["textOperationTable"]; string operationTypeCode = request.Params["selectOperationTypeCode"]; string resultCode = request.Params["textResultCode"]; string userName = request.Params["textUserName"]; CriterionAndOrder operationLogCriterionAndOrder = new CriterionAndOrder(); operationLogCriterionAndOrder.CriteriaName = typeof(OperationLog).FullName; operationLogCriterionAndOrder.CriteriaAsName = "OL"; operationLogCriterionAndOrder.OrderList.Add(new Order("OL.AddTime", false)); CriterionAndOrder conLogCriterionAndOrder = new CriterionAndOrder(); conLogCriterionAndOrder.CriteriaName = "ConLogRef"; conLogCriterionAndOrder.CriteriaAsName = "CL"; conLogCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName = "SystemUserRef"; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(beginAddTime)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Gt("OL.AddTime", Convert.ToDateTime(beginAddTime))); if (!String.IsNullOrEmpty(endAddTime)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Lt("OL.AddTime", Convert.ToDateTime(endAddTime))); if (!String.IsNullOrEmpty(isSuccessId)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("OL.IsSuccessId", isSuccessId)); if (!String.IsNullOrEmpty(operationTable)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Like("OL.OperationTable", "%" + operationTable + "%")); if (!String.IsNullOrEmpty(operationTypeCode)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("OL.OperationTypeCode", operationTypeCode)); if (!String.IsNullOrEmpty(resultCode)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("OL.ResultCode", Convert.ToInt32(resultCode))); if (!String.IsNullOrEmpty(userName)) operationLogCriterionAndOrder.CriterionList.Add(Restrictions.Like("SU.UserName", "%" + userName + "%")); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("OL.OperationLogId").As("PrimaryKey")); pList.Add(Projections.Property("OL.AddTime").As("AddTime")); pList.Add(Projections.Property("OL.IsSuccessText").As("IsSuccessText")); pList.Add(Projections.Property("OL.OperationLogId").As("OperationLogId")); pList.Add(Projections.Property("OL.ObjectRecordId").As("ObjectRecordId")); pList.Add(Projections.Property("OL.OperationContent").As("OperationContent")); pList.Add(Projections.Property("OL.OperationTable").As("OperationTable")); pList.Add(Projections.Property("OL.OperationTypeText").As("OperationTypeText")); pList.Add(Projections.Property("OL.ResultText").As("ResultText")); pList.Add(Projections.Property("SU.UserId").As("UserId")); pList.Add(Projections.Property("SU.UserName").As("SystemUserName")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(OperationLog); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(operationLogCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(conLogCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = OperationLogBll.GetOperationLogList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string description=request.Params["textDescription"]; string imageId=request.Params["textImageId"]; string patientId=request.Params["textPatientId"]; string type=request.Params["textType"]; string updateTime=request.Params["textUpdateTime"]; string url=request.Params["textUrl"]; CriterionAndOrder digitalImageCriterionAndOrder = new CriterionAndOrder(); digitalImageCriterionAndOrder.CriteriaName = typeof(DigitalImage).FullName; digitalImageCriterionAndOrder.CriteriaAsName = "DI"; digitalImageCriterionAndOrder.OrderList.Add(new Order("DI.AddTime", false)); if (!String.IsNullOrEmpty(addTime)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(description)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.Description", description)); if (!String.IsNullOrEmpty(imageId)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.ImageId", imageId)); if (!String.IsNullOrEmpty(patientId)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.PatientId", patientId)); if (!String.IsNullOrEmpty(type)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.Type", type)); if (!String.IsNullOrEmpty(updateTime)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.UpdateTime", Convert.ToDateTime(updateTime))); if (!String.IsNullOrEmpty(url)) digitalImageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("DI.Url", url)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("DI.ImageId").As("PrimaryKey")); pList.Add(Projections.Property("DI.AddTime").As("AddTime")); pList.Add(Projections.Property("DI.Description").As("Description")); pList.Add(Projections.Property("DI.ImageId").As("ImageId")); pList.Add(Projections.Property("DI.PatientId").As("PatientId")); pList.Add(Projections.Property("DI.Type").As("Type")); pList.Add(Projections.Property("DI.UpdateTime").As("UpdateTime")); pList.Add(Projections.Property("DI.Url").As("Url")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(DigitalImage); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(digitalImageCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = DigitalImageBll.GetDigitalImageList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string age=request.Params["textAge"]; string applicantDescription=request.Params["textApplicantDescription"]; string applicantId=request.Params["textApplicantId"]; string arrangeAddress=request.Params["textArrangeAddress"]; string arrangeTime=request.Params["textArrangeTime"]; string birthdate=request.Params["textBirthdate"]; string deployerDescription=request.Params["textDeployerDescription"]; string deployerId=request.Params["textDeployerId"]; string email=request.Params["textEmail"]; string genderId=request.Params["textGenderId"]; string idNumber=request.Params["textIdNumber"]; string idType=request.Params["textIdType"]; string marriage=request.Params["textMarriage"]; string phyExamType=request.Params["textPhyExamType"]; string realName=request.Params["textRealName"]; string reserId=request.Params["textReserId"]; string telephone=request.Params["textTelephone"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder phyExamReserCriterionAndOrder = new CriterionAndOrder(); phyExamReserCriterionAndOrder.CriteriaName = typeof(PhyExamReser).FullName; phyExamReserCriterionAndOrder.CriteriaAsName = "PER"; phyExamReserCriterionAndOrder.OrderList.Add(new Order("PER.AddTime", false)); CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName ="ApplicantRef" ; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName ="DeployerRef" ; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(age)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.Age", Convert.ToInt32(age))); if (!String.IsNullOrEmpty(applicantDescription)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.ApplicantDescription", applicantDescription)); if (!String.IsNullOrEmpty(applicantId)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.ApplicantId", applicantId)); if (!String.IsNullOrEmpty(arrangeAddress)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.ArrangeAddress", arrangeAddress)); if (!String.IsNullOrEmpty(arrangeTime)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.ArrangeTime", Convert.ToChar(arrangeTime))); if (!String.IsNullOrEmpty(birthdate)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.Birthdate", Convert.ToDateTime(birthdate))); if (!String.IsNullOrEmpty(deployerDescription)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.DeployerDescription", deployerDescription)); if (!String.IsNullOrEmpty(deployerId)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.DeployerId", deployerId)); if (!String.IsNullOrEmpty(email)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.Email", email)); if (!String.IsNullOrEmpty(genderId)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.GenderId", genderId)); if (!String.IsNullOrEmpty(idNumber)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.IdNumber", idNumber)); if (!String.IsNullOrEmpty(idType)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.IdType", idType)); if (!String.IsNullOrEmpty(marriage)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.Marriage", marriage)); if (!String.IsNullOrEmpty(phyExamType)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.PhyExamType", phyExamType)); if (!String.IsNullOrEmpty(realName)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.RealName", realName)); if (!String.IsNullOrEmpty(reserId)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.ReserId", reserId)); if (!String.IsNullOrEmpty(telephone)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.Telephone", telephone)); if (!String.IsNullOrEmpty(updateTime)) phyExamReserCriterionAndOrder.CriterionList.Add(Restrictions.Eq("PER.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("PER.ReserId").As("PrimaryKey")); pList.Add(Projections.Property("PER.AddTime").As("AddTime")); pList.Add(Projections.Property("PER.Age").As("Age")); pList.Add(Projections.Property("PER.ApplicantDescription").As("ApplicantDescription")); pList.Add(Projections.Property("SU.UserId").As("ApplicantId")); pList.Add(Projections.Property("PER.ArrangeAddress").As("ArrangeAddress")); pList.Add(Projections.Property("PER.ArrangeTime").As("ArrangeTime")); pList.Add(Projections.Property("PER.Birthdate").As("Birthdate")); pList.Add(Projections.Property("PER.DeployerDescription").As("DeployerDescription")); pList.Add(Projections.Property("SU.UserId").As("DeployerId")); pList.Add(Projections.Property("PER.Email").As("Email")); pList.Add(Projections.Property("PER.GenderId").As("GenderId")); pList.Add(Projections.Property("PER.IdNumber").As("IdNumber")); pList.Add(Projections.Property("PER.IdType").As("IdType")); pList.Add(Projections.Property("PER.Marriage").As("Marriage")); pList.Add(Projections.Property("PER.PhyExamType").As("PhyExamType")); pList.Add(Projections.Property("PER.RealName").As("RealName")); pList.Add(Projections.Property("PER.ReserId").As("ReserId")); pList.Add(Projections.Property("PER.Telephone").As("Telephone")); pList.Add(Projections.Property("PER.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(PhyExamReser); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(phyExamReserCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = PhyExamReserBll.GetPhyExamReserList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string actualBeginTime=request.Params["textActualBeginTime"]; string actualDurationTime=request.Params["textActualDurationTime"]; string actualEndTime=request.Params["textActualEndTime"]; string actualUserNo=request.Params["textActualUserNo"]; string addTime=request.Params["textAddTime"]; string adminId=request.Params["textAdminId"]; string conferenceId=request.Params["textConferenceId"]; string createrId=request.Params["textCreaterId"]; string maxUserNo=request.Params["textMaxUserNo"]; string password=request.Params["textPassword"]; string reserBeginTime=request.Params["textReserBeginTime"]; string reserDurationTime=request.Params["textReserDurationTime"]; string reserEndTime=request.Params["textReserEndTime"]; string updateTime=request.Params["textUpdateTime"]; CriterionAndOrder conferenceCriterionAndOrder = new CriterionAndOrder(); conferenceCriterionAndOrder.CriteriaName = typeof(Conference).FullName; conferenceCriterionAndOrder.CriteriaAsName = "C"; conferenceCriterionAndOrder.OrderList.Add(new Order("C.AddTime", false)); CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName ="AdminRef" ; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder systemUserCriterionAndOrder = new CriterionAndOrder(); systemUserCriterionAndOrder.CriteriaName ="CreaterRef" ; systemUserCriterionAndOrder.CriteriaAsName = "SU"; systemUserCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(actualBeginTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualBeginTime", Convert.ToDateTime(actualBeginTime))); if (!String.IsNullOrEmpty(actualDurationTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualDurationTime", Convert.ToInt32(actualDurationTime))); if (!String.IsNullOrEmpty(actualEndTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualEndTime", Convert.ToDateTime(actualEndTime))); if (!String.IsNullOrEmpty(actualUserNo)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ActualUserNo", Convert.ToInt32(actualUserNo))); if (!String.IsNullOrEmpty(addTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(adminId)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.AdminId", adminId)); if (!String.IsNullOrEmpty(conferenceId)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ConferenceId", conferenceId)); if (!String.IsNullOrEmpty(createrId)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.CreaterId", createrId)); if (!String.IsNullOrEmpty(maxUserNo)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.MaxUserNo", Convert.ToInt32(maxUserNo))); if (!String.IsNullOrEmpty(password)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.Password", password)); if (!String.IsNullOrEmpty(reserBeginTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ReserBeginTime", Convert.ToDateTime(reserBeginTime))); if (!String.IsNullOrEmpty(reserDurationTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ReserDurationTime", reserDurationTime)); if (!String.IsNullOrEmpty(reserEndTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.ReserEndTime", Convert.ToDateTime(reserEndTime))); if (!String.IsNullOrEmpty(updateTime)) conferenceCriterionAndOrder.CriterionList.Add(Restrictions.Eq("C.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("C.ConferenceId").As("PrimaryKey")); pList.Add(Projections.Property("C.ActualBeginTime").As("ActualBeginTime")); pList.Add(Projections.Property("C.ActualDurationTime").As("ActualDurationTime")); pList.Add(Projections.Property("C.ActualEndTime").As("ActualEndTime")); pList.Add(Projections.Property("C.ActualUserNo").As("ActualUserNo")); pList.Add(Projections.Property("C.AddTime").As("AddTime")); pList.Add(Projections.Property("SU.UserId").As("AdminId")); pList.Add(Projections.Property("C.ConferenceId").As("ConferenceId")); pList.Add(Projections.Property("SU.UserId").As("CreaterId")); pList.Add(Projections.Property("C.MaxUserNo").As("MaxUserNo")); pList.Add(Projections.Property("C.Password").As("Password")); pList.Add(Projections.Property("C.ReserBeginTime").As("ReserBeginTime")); pList.Add(Projections.Property("C.ReserDurationTime").As("ReserDurationTime")); pList.Add(Projections.Property("C.ReserEndTime").As("ReserEndTime")); pList.Add(Projections.Property("C.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(Conference); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(conferenceCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(systemUserCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConferenceBll.GetConferenceList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime = request.Params["textAddTime"]; string description = request.Params["textDescription"]; string functionModule = request.Params["textFunctionModule"]; string menuId = request.Params["textMenuId"]; string menuName = request.Params["textMenuName"]; string pageId = request.Params["textPageId"]; string url = request.Params["textUrl"]; string moduleLevel = request.Params["selectModuleLevelId"]; string farther = request.Params["selectFartherId"]; CriterionAndOrder linkMenuCriterionAndOrder = new CriterionAndOrder(); linkMenuCriterionAndOrder.CriteriaName = typeof(LinkMenu).FullName; linkMenuCriterionAndOrder.CriteriaAsName = "LM"; CriterionAndOrder webPageCriterionAndOrder = new CriterionAndOrder(); webPageCriterionAndOrder.CriteriaName = "WebPageRef"; webPageCriterionAndOrder.CriteriaAsName = "WP"; webPageCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder functionModuleCriterionAndOrder = new CriterionAndOrder(); functionModuleCriterionAndOrder.CriteriaName = "FunctionModuleRef"; functionModuleCriterionAndOrder.CriteriaAsName = "FM"; functionModuleCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) linkMenuCriterionAndOrder.CriterionList.Add(Restrictions.Eq("LM.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(description)) linkMenuCriterionAndOrder.CriterionList.Add(Restrictions.Eq("LM.Description", description)); if (!String.IsNullOrEmpty(functionModule)) linkMenuCriterionAndOrder.CriterionList.Add(Restrictions.Eq("LM.FunctionModule", functionModule)); if (!String.IsNullOrEmpty(menuId)) linkMenuCriterionAndOrder.CriterionList.Add(Restrictions.Eq("LM.MenuId", menuId)); if (!String.IsNullOrEmpty(menuName)) linkMenuCriterionAndOrder.CriterionList.Add(Restrictions.Like("LM.MenuName", "%" + menuName + "%")); if (!String.IsNullOrEmpty(pageId)) webPageCriterionAndOrder.CriterionList.Add(Restrictions.Eq("WP.PageId", pageId)); if (!String.IsNullOrEmpty(url)) webPageCriterionAndOrder.CriterionList.Add(Restrictions.Like("WP.Url", "%" + url + "%")); if (!String.IsNullOrEmpty(moduleLevel)) functionModuleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.ModuleLevelId", Convert.ToInt32(moduleLevel))); if (!String.IsNullOrEmpty(farther)) functionModuleCriterionAndOrder.CriterionList.Add(Restrictions.Eq("FM.FartherId", farther)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("LM.MenuId").As("PrimaryKey")); pList.Add(Projections.Property("LM.MenuId").As("MenuId")); pList.Add(Projections.Property("LM.MenuName").As("MenuName")); pList.Add(Projections.Property("LM.AddTime").As("AddTime")); pList.Add(Projections.Property("FM.ModuleId").As("ModuleId")); pList.Add(Projections.Property("FM.ModuleName").As("FunctionModuleName")); pList.Add(Projections.Property("WP.PageId").As("PageId")); pList.Add(Projections.Property("WP.Url").As("WebPageUrl")); functionModuleCriterionAndOrder.OrderList.Add(new Order("FM.ModuleLevelId", true)); functionModuleCriterionAndOrder.OrderList.Add(new Order("FM.FartherId", true)); functionModuleCriterionAndOrder.OrderList.Add(new Order("FM.SortFieldId", true)); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(LinkMenu); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(linkMenuCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(webPageCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(functionModuleCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = LinkMenuBll.GetLinkMenuList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime=request.Params["textAddTime"]; string cardId=request.Params["textCardId"]; string conComId=request.Params["textConComId"]; string consumerId=request.Params["textConsumerId"]; string itemId=request.Params["textItemId"]; string logId=request.Params["textLogId"]; CriterionAndOrder consumptionLogCriterionAndOrder = new CriterionAndOrder(); consumptionLogCriterionAndOrder.CriteriaName = typeof(ConsumptionLog).FullName; consumptionLogCriterionAndOrder.CriteriaAsName = "CL"; consumptionLogCriterionAndOrder.OrderList.Add(new Order("CL.AddTime", false)); CriterionAndOrder membershipCardCriterionAndOrder = new CriterionAndOrder(); membershipCardCriterionAndOrder.CriteriaName ="CardRef" ; membershipCardCriterionAndOrder.CriteriaAsName = "MC"; membershipCardCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder consumptionCombinationCriterionAndOrder = new CriterionAndOrder(); consumptionCombinationCriterionAndOrder.CriteriaName ="ConComRef" ; consumptionCombinationCriterionAndOrder.CriteriaAsName = "CC"; consumptionCombinationCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder consumerCriterionAndOrder = new CriterionAndOrder(); consumerCriterionAndOrder.CriteriaName ="ConsumerRef" ; consumerCriterionAndOrder.CriteriaAsName = "C"; consumerCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; CriterionAndOrder serviceItemCriterionAndOrder = new CriterionAndOrder(); serviceItemCriterionAndOrder.CriteriaName ="ItemRef" ; serviceItemCriterionAndOrder.CriteriaAsName = "SI"; serviceItemCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) consumptionLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(cardId)) consumptionLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.CardId", cardId)); if (!String.IsNullOrEmpty(conComId)) consumptionLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.ConComId", conComId)); if (!String.IsNullOrEmpty(consumerId)) consumptionLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.ConsumerId", consumerId)); if (!String.IsNullOrEmpty(itemId)) consumptionLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.ItemId", itemId)); if (!String.IsNullOrEmpty(logId)) consumptionLogCriterionAndOrder.CriterionList.Add(Restrictions.Eq("CL.LogId", logId)); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("CL.LogId").As("PrimaryKey")); pList.Add(Projections.Property("CL.AddTime").As("AddTime")); pList.Add(Projections.Property("MC.CardId").As("CardId")); pList.Add(Projections.Property("CC.ConComId").As("ConComId")); pList.Add(Projections.Property("C.ConsumerId").As("ConsumerId")); pList.Add(Projections.Property("SI.ItemId").As("ItemId")); pList.Add(Projections.Property("CL.LogId").As("LogId")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(ConsumptionLog); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(consumptionLogCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(membershipCardCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(consumptionCombinationCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(consumerCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(serviceItemCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = ConsumptionLogBll.GetConsumptionLogList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling=NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }
/// <summary> /// 复杂查询操作 /// </summary> protected void QueryRecord() { HttpContext context = HttpContext.Current; HttpRequest request = context.Request; HttpResponse response = context.Response; string pageSize = request.Params["pageSize"]; string pageIndex = request.Params["pageIndex"]; string addTime = request.Params["textAddTime"]; string code = request.Params["textCode"]; string description = request.Params["textDescription"]; string id = request.Params["textId"]; string name = request.Params["textName"]; string typeName = request.Params["textTypeName"]; string updateTime = request.Params["textUpdateTime"]; string dictTypeId = request.Params["textDictTypeId"]; CriterionAndOrder dictionaryCriterionAndOrder = new CriterionAndOrder(); dictionaryCriterionAndOrder.CriteriaName = typeof(Dictionary).FullName; dictionaryCriterionAndOrder.CriteriaAsName = "D"; dictionaryCriterionAndOrder.OrderList.Add(new Order("D.DictTypeId", true)); dictionaryCriterionAndOrder.OrderList.Add(new Order("D.Code", true)); CriterionAndOrder dictionaryTypeCriterionAndOrder = new CriterionAndOrder(); dictionaryTypeCriterionAndOrder.CriteriaName = "TypeRef"; dictionaryTypeCriterionAndOrder.CriteriaAsName = "DT"; dictionaryTypeCriterionAndOrder.CriteriaSpecification = CriteriaSpecification.LeftJoin; if (!String.IsNullOrEmpty(addTime)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Gt("D.AddTime", Convert.ToDateTime(addTime))); if (!String.IsNullOrEmpty(code)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Eq("D.Code", Convert.ToChar(code))); if (!String.IsNullOrEmpty(description)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Like("D.Description", "%" + description + "%")); if (!String.IsNullOrEmpty(id)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Eq("D.DictId", id)); if (!String.IsNullOrEmpty(name)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Like("D.Name", "%" + name + "%")); if (!String.IsNullOrEmpty(dictTypeId)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Eq("D.DictTypeId", dictTypeId)); if (!String.IsNullOrEmpty(typeName)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Like("DT.Name", "%" + typeName + "%")); if (!String.IsNullOrEmpty(updateTime)) dictionaryCriterionAndOrder.CriterionList.Add(Restrictions.Gt("D.UpdateTime", Convert.ToDateTime(updateTime))); ProjectionList pList = Projections.ProjectionList(); pList.Add(Projections.Property("D.DictId").As("PrimaryKey")); pList.Add(Projections.Property("D.AddTime").As("AddTime")); pList.Add(Projections.Property("D.Code").As("Code")); pList.Add(Projections.Property("D.Description").As("Description")); pList.Add(Projections.Property("D.DictId").As("DictId")); pList.Add(Projections.Property("D.Name").As("Name")); pList.Add(Projections.Property("DT.DictTypeId").As("DictTypeId")); pList.Add(Projections.Property("DT.Name").As("TypeName")); pList.Add(Projections.Property("D.UpdateTime").As("UpdateTime")); QueryTerms queryTerms = new QueryTerms(); queryTerms.PersistentClass = typeof(Dictionary); queryTerms.ColumnList = pList; queryTerms.CriterionAndOrderList.Add(dictionaryCriterionAndOrder); queryTerms.CriterionAndOrderList.Add(dictionaryTypeCriterionAndOrder); queryTerms.PageSize = Convert.ToInt32(pageSize); queryTerms.PageIndex = Convert.ToInt32(pageIndex) - 1; ResultModel result = DictionaryBll.GetDictionaryList(queryTerms); string jsonString = JsonConvert.SerializeObject(result, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); response.Write(jsonString); }