/// <summary> /// 查找是否存在所选周日志。 /// </summary> /// <param name="wlogweeksummary"></param> /// <param name="json"></param> /// <returns></returns> public bool FindUserWeekSummary(EntityWLOGWeekSummary wlogweeksummary, ref string json) { #region int totalCount = 0; PageParams pageparams = new PageParams(); WLOGWeekSummaryData wlogweeksummarydata = new WLOGWeekSummaryData(); DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(WLOGWeekSummaryData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, wlogweeksummary.writeUser); querybusinessparams.Add(WLOGWeekSummaryData.startDate, EnumSqlType.datetime, EnumCondition.Equal, wlogweeksummary.startDate); WLOGWeekSummaryData weeksummarydata = new WLOGWeekSummaryData(); totalCount = this._wlogweeksummaryclass.GetSingleT(weeksummarydata, querybusinessparams); JsonHelper jsonhlp = new JsonHelper(); if (weeksummarydata.Tables[0].Rows.Count > 0) { jsonhlp.AddObjectToJson("msg", "请注意:每人每周只限一篇总结!"); jsonhlp.SetResult(false); json = jsonhlp.ToString(); return(true); } else { return(false); } #endregion }
/// <summary> /// /// </summary> /// <param name="personlog"></param> /// <returns></returns> public string GetPersonLogsIdByMissionId(EntityWLOGPersonLog personlog) { #region PageParams pageparams = new PageParams(); DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(WLOGPersonLogData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, personlog.writeUser); querybusinessparams.Add(WLOGPersonLogData.missionId, EnumSqlType.sqlint, EnumCondition.Equal, personlog.missionId); WLOGPersonLogData wlogpersonlogdata = new WLOGPersonLogData(); this._wlogpersonlogclass.GetSingleT(wlogpersonlogdata, querybusinessparams); JsonHelper jsonhlp = new JsonHelper(); string logsid = ""; DataRowCollection drcollect = wlogpersonlogdata.Tables[0].Rows; for (int i = 0; i < drcollect.Count; i++) { string temp = drcollect[i][WLOGPersonLogData.logId].ToString(); if (i != drcollect.Count - 1) { temp += ','; } logsid += temp; } jsonhlp.AddObjectToJson("logsid", logsid); jsonhlp.SetResult(true); return(jsonhlp.ToString()); #endregion }
public string GetMissionsIdBySummaryId(EntityWLOGMission mission) { #region DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(WLOGMissionData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, mission.writeUser); querybusinessparams.Add(WLOGMissionData.summaryId, EnumSqlType.sqlint, EnumCondition.Equal, mission.summaryId); WLOGMissionData missiondata = new WLOGMissionData(); this._wlogmissionclass.GetSingleT(missiondata, querybusinessparams); JsonHelper jsonhlp = new JsonHelper(); string missionsid = ""; DataRowCollection drcollect = missiondata.Tables[0].Rows; for (int i = 0; i < drcollect.Count; i++) { string temp = drcollect[i][WLOGMissionData.missionId].ToString(); if (i != drcollect.Count - 1) { temp += ','; } missionsid += temp; } jsonhlp.AddObjectToJson("missionId", missionsid); jsonhlp.SetResult(true); return(jsonhlp.ToString()); #endregion }
public TUserData GetUserCheck(string userid, string userPwd) { DBConditions querybusinessparams = new DBConditions(); TUserData tuserdata = new TUserData(); querybusinessparams.Add(TUserData.userid, EnumSqlType.nvarchar, EnumCondition.Equal, userid); querybusinessparams.Add(TUserData.userpwd, EnumSqlType.nvarchar, EnumCondition.Equal, userPwd); this._tuserclass.GetSingleTAllWithoutCount(tuserdata, querybusinessparams); return(tuserdata); }
/// <summary> /// 根据条件筛选所有ExamHistoryEssay指定页码的数据(分页型) /// </summary> /// <param name="examhistoryessay">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public ExamHistoryEssayData GetData(EntityExamHistoryEssay examhistoryessay, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(ExamHistoryEssayData.answerHistoryId, EnumSqlType.sqlint, EnumCondition.Equal, examhistoryessay.answerHistoryId); querybusinessparams.Add(ExamHistoryEssayData.questionId, EnumSqlType.sqlint, EnumCondition.Equal, examhistoryessay.questionId); querybusinessparams.Add(ExamHistoryEssayData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, examhistoryessay.writeUser); querybusinessparams.Add(ExamHistoryEssayData.examHistoryId, EnumSqlType.sqlint, EnumCondition.Equal, examhistoryessay.examHistoryId); querybusinessparams.Add(ExamHistoryEssayData.answer, EnumSqlType.nvarchar, EnumCondition.Equal, examhistoryessay.answer); querybusinessparams.Add(ExamHistoryEssayData.score, EnumSqlType.sqlint, EnumCondition.Equal, examhistoryessay.score); querybusinessparams.Add(ExamHistoryEssayData.remark, EnumSqlType.nvarchar, EnumCondition.Equal, examhistoryessay.remark); querybusinessparams.Add(ExamHistoryEssayData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, examhistoryessay.writeIp); querybusinessparams.Add(ExamHistoryEssayData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, examhistoryessay.writeTime); ExamHistoryEssayData examhistoryessaydata = new ExamHistoryEssayData(); totalCount = this._examhistoryessayclass.GetSingleT(examhistoryessaydata, querybusinessparams); return(examhistoryessaydata); #endregion }
/// <summary> /// 根据条件筛选所有ExamHistory指定页码的数据(分页型) /// </summary> /// <param name="examhistory">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public ExamHistoryData GetData(EntityExamHistory examhistory, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(ExamHistoryData.examHistoryId, EnumSqlType.sqlint, EnumCondition.Equal, examhistory.examHistoryId); querybusinessparams.Add(ExamHistoryData.examPaperId, EnumSqlType.sqlint, EnumCondition.Equal, examhistory.examPaperId); querybusinessparams.Add(ExamHistoryData.giveScoreRemark, EnumSqlType.nvarchar, EnumCondition.Equal, examhistory.giveScoreRemark); querybusinessparams.Add(ExamHistoryData.giveScoreUser, EnumSqlType.sqlint, EnumCondition.Equal, examhistory.giveScoreUser); querybusinessparams.Add(ExamHistoryData.giveScoreTime, EnumSqlType.datetime, EnumCondition.Equal, examhistory.giveScoreTime); querybusinessparams.Add(ExamHistoryData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, examhistory.writeUser); querybusinessparams.Add(ExamHistoryData.examSubmitTime, EnumSqlType.datetime, EnumCondition.Equal, examhistory.examSubmitTime); querybusinessparams.Add(ExamHistoryData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, examhistory.writeIp); querybusinessparams.Add(ExamHistoryData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, examhistory.writeTime); ExamHistoryData examhistorydata = new ExamHistoryData(); totalCount = this._examhistoryclass.GetSingleT(examhistorydata, querybusinessparams); return(examhistorydata); #endregion }
/// <summary> /// 根据条件筛选所有UsbKey指定页码的数据(分页型) /// </summary> /// <param name="usbkey">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityUsbKey usbkey, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(UsbKeyData.keyId, EnumSqlType.sqlint, EnumCondition.Equal, usbkey.keyId); querybusinessparams.Add(UsbKeyData.userid, EnumSqlType.sqlint, EnumCondition.Equal, usbkey.userid); querybusinessparams.Add(UsbKeyData.writeUserid, EnumSqlType.sqlint, EnumCondition.Equal, usbkey.writeUserid); querybusinessparams.Add(UsbKeyData.fullname, EnumSqlType.nvarchar, EnumCondition.Equal, usbkey.fullname); querybusinessparams.Add(UsbKeyData.giveoutTime, EnumSqlType.datetime, EnumCondition.Equal, usbkey.giveoutTime); querybusinessparams.Add(UsbKeyData.giveoutPerson, EnumSqlType.sqlint, EnumCondition.Equal, usbkey.giveoutPerson); querybusinessparams.Add(UsbKeyData.usable, EnumSqlType.bit, EnumCondition.Equal, usbkey.usable); querybusinessparams.Add(UsbKeyData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, usbkey.writeTime); querybusinessparams.Add(UsbKeyData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, usbkey.writeIp); UsbKeyData usbkeydata = new UsbKeyData(); totalCount = this._usbkeyclass.GetSingleT(usbkeydata, querybusinessparams); return(usbkeydata); #endregion }
/// <summary> /// 根据条件筛选所有ExamQuestion指定页码的数据(分页型) /// </summary> /// <param name="examquestion">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public ExamQuestionData GetData(EntityExamQuestion examquestion, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(ExamQuestionData.questionId, EnumSqlType.sqlint, EnumCondition.Equal, examquestion.questionId); querybusinessparams.Add(ExamQuestionData.questionTypeId, EnumSqlType.tinyint, EnumCondition.Equal, examquestion.questionTypeId); querybusinessparams.Add(ExamQuestionData.questionScopeId, EnumSqlType.sqlint, EnumCondition.Equal, examquestion.questionScopeId); querybusinessparams.Add(ExamQuestionData.questionName, EnumSqlType.nvarchar, EnumCondition.LikeBoth, examquestion.questionName); querybusinessparams.Add(ExamQuestionData.usable, EnumSqlType.bit, EnumCondition.Equal, examquestion.usable); querybusinessparams.Add(ExamQuestionData.sort, EnumSqlType.tinyint, EnumCondition.Equal, examquestion.sort); querybusinessparams.Add(ExamQuestionData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, examquestion.writeUser); querybusinessparams.Add(ExamQuestionData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, examquestion.writeIp); querybusinessparams.Add(ExamQuestionData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, examquestion.writeTime); ExamQuestionData examquestiondata = new ExamQuestionData(); totalCount = this._examquestionclass.GetSingleT(examquestiondata, querybusinessparams); return(examquestiondata); #endregion }
/// <summary> /// 根据条件筛选所有ExamPaper指定页码的数据(分页型) /// </summary> /// <param name="exampaper">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public ExamPaperData GetData(EntityExamPaper exampaper, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(ExamPaperData.examPaperId, EnumSqlType.sqlint, EnumCondition.Equal, exampaper.examPaperId); querybusinessparams.Add(ExamPaperData.examTemplateId, EnumSqlType.sqlint, EnumCondition.Equal, exampaper.examTemplateId); querybusinessparams.Add(ExamPaperData.exampaperName, EnumSqlType.nvarchar, EnumCondition.Equal, exampaper.exampaperName); querybusinessparams.Add(ExamPaperData.usable, EnumSqlType.bit, EnumCondition.Equal, exampaper.usable); querybusinessparams.Add(ExamPaperData.remark, EnumSqlType.nvarchar, EnumCondition.Equal, exampaper.remark); querybusinessparams.Add(ExamPaperData.sort, EnumSqlType.tinyint, EnumCondition.Equal, exampaper.sort); querybusinessparams.Add(ExamPaperData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, exampaper.writeUser); querybusinessparams.Add(ExamPaperData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, exampaper.writeIp); querybusinessparams.Add(ExamPaperData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, exampaper.writeTime); ExamPaperData exampaperdata = new ExamPaperData(); totalCount = this._exampaperclass.GetSingleT(exampaperdata, querybusinessparams); return(exampaperdata); #endregion }
/// <summary> /// 根据条件筛选所有ProjectCollect指定页码的数据(分页型) /// </summary> /// <param name="projectcollect">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityProjectCollect projectcollect, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(ProjectCollectData.projectCollectId, EnumSqlType.sqlint, EnumCondition.Equal, projectcollect.projectCollectId); querybusinessparams.Add(ProjectCollectData.collectTypeId, EnumSqlType.sqlint, EnumCondition.Equal, projectcollect.collectTypeId); querybusinessparams.Add(ProjectCollectData.projectItemName, EnumSqlType.nvarchar, EnumCondition.Equal, projectcollect.projectItemName); querybusinessparams.Add(ProjectCollectData.systemName, EnumSqlType.nvarchar, EnumCondition.Equal, projectcollect.systemName); querybusinessparams.Add(ProjectCollectData.fileNo, EnumSqlType.nvarchar, EnumCondition.Equal, projectcollect.fileNo); querybusinessparams.Add(ProjectCollectData.fileTime, EnumSqlType.datetime, EnumCondition.Equal, projectcollect.fileTime); querybusinessparams.Add(ProjectCollectData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, projectcollect.writeUser); querybusinessparams.Add(ProjectCollectData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, projectcollect.writeTime); querybusinessparams.Add(ProjectCollectData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, projectcollect.writeIp); ProjectCollectData projectcollectdata = new ProjectCollectData(); totalCount = this._projectcollectclass.GetSingleT(projectcollectdata, querybusinessparams); return(projectcollectdata); #endregion }
/// <summary> /// 根据条件筛选所有Menu指定页码的数据(分页型) /// </summary> /// <param name="menu">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityMenu menu, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(MenuData.menuId, EnumSqlType.sqlint, EnumCondition.Equal, menu.menuId); querybusinessparams.Add(MenuData.currentId, EnumSqlType.sqlint, EnumCondition.Equal, menu.currentId); querybusinessparams.Add(MenuData.parentId, EnumSqlType.sqlint, EnumCondition.Equal, menu.parentId); querybusinessparams.Add(MenuData.menuName, EnumSqlType.nvarchar, EnumCondition.Equal, menu.menuName); querybusinessparams.Add(MenuData.iconCls, EnumSqlType.nvarchar, EnumCondition.Equal, menu.iconCls); querybusinessparams.Add(MenuData.htmlurl, EnumSqlType.nvarchar, EnumCondition.Equal, menu.htmlurl); querybusinessparams.Add(MenuData.eventName, EnumSqlType.nvarchar, EnumCondition.Equal, menu.eventName); querybusinessparams.Add(MenuData.sort, EnumSqlType.sqlint, EnumCondition.Equal, menu.sort); querybusinessparams.Add(MenuData.usable, EnumSqlType.bit, EnumCondition.Equal, menu.usable); MenuData menudata = new MenuData(); totalCount = this._menuclass.GetSingleT(menudata, querybusinessparams); return(menudata); #endregion }
/// <summary> /// 根据条件筛选所有ExamScoreRate指定页码的数据(分页型) /// </summary> /// <param name="examscorerate">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public ExamScoreRateData GetData(EntityExamScoreRate examscorerate, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(ExamScoreRateData.examScoreId, EnumSqlType.sqlint, EnumCondition.Equal, examscorerate.examScoreId); querybusinessparams.Add(ExamScoreRateData.examTemplateId, EnumSqlType.sqlint, EnumCondition.Equal, examscorerate.examTemplateId); querybusinessparams.Add(ExamScoreRateData.questionTypeId, EnumSqlType.tinyint, EnumCondition.Equal, examscorerate.questionTypeId); querybusinessparams.Add(ExamScoreRateData.rate, EnumSqlType.sqldecimal, EnumCondition.Equal, examscorerate.rate); querybusinessparams.Add(ExamScoreRateData.usable, EnumSqlType.bit, EnumCondition.Equal, examscorerate.usable); querybusinessparams.Add(ExamScoreRateData.writeUser, EnumSqlType.sqlint, EnumCondition.Equal, examscorerate.writeUser); querybusinessparams.Add(ExamScoreRateData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, examscorerate.writeIp); querybusinessparams.Add(ExamScoreRateData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, examscorerate.writeTime); ExamScoreRateData examscoreratedata = new ExamScoreRateData(); totalCount = this._examscorerateclass.GetSingleT(examscoreratedata, querybusinessparams); return(examscoreratedata); #endregion }
/// <summary> /// 根据条件筛选所有Organization指定页码的数据(分页型) /// </summary> /// <param name="organization">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityOrganization organization, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(OrganizationData.organizationId, EnumSqlType.sqlint, EnumCondition.Equal, organization.organizationId); querybusinessparams.Add(OrganizationData.userid, EnumSqlType.sqlint, EnumCondition.Equal, organization.userid); querybusinessparams.Add(OrganizationData.organizationName, EnumSqlType.nvarchar, EnumCondition.Equal, organization.organizationName); querybusinessparams.Add(OrganizationData.currentId, EnumSqlType.sqlint, EnumCondition.Equal, organization.currentId); querybusinessparams.Add(OrganizationData.parentId, EnumSqlType.sqlint, EnumCondition.Equal, organization.parentId); querybusinessparams.Add(OrganizationData.usable, EnumSqlType.bit, EnumCondition.Equal, organization.usable); querybusinessparams.Add(OrganizationData.writeIp, EnumSqlType.nvarchar, EnumCondition.Equal, organization.writeIp); querybusinessparams.Add(OrganizationData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, organization.writeTime); OrganizationData organizationdata = new OrganizationData(); totalCount = this._organizationclass.GetSingleT(organizationdata, querybusinessparams); return(organizationdata); #endregion }
public string GetWorkTotal(EntityMissionReport missionReport) { #region DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(ApplicationUserData.userid, EnumSqlType.sqlint, EnumCondition.InValues, missionReport.writeUser); querybusinessparams.Add(ApplicationUserData.isTotal, EnumSqlType.bit, EnumCondition.Equal, true); DataSet wlogmissiondata = this._wlogmissionclass.SelectWorktotal(querybusinessparams, missionReport.startDate, missionReport.endDate, missionReport.missionState, missionReport.reviewState); int totalCount = wlogmissiondata.Tables[0].Rows.Count; return(base.GetJson(wlogmissiondata, totalCount)); #endregion }
/// <summary> /// 根据条件筛选所有Address指定页码的数据(分页型) /// </summary> /// <param name="address">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityAddress address, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(AddressData.addrId, EnumSqlType.sqlint, EnumCondition.Equal, address.addrId); querybusinessparams.Add(AddressData.addrName, EnumSqlType.nvarchar, EnumCondition.Equal, address.addrName); querybusinessparams.Add(AddressData.parentId, EnumSqlType.sqlint, EnumCondition.Equal, address.parentId); querybusinessparams.Add(AddressData.usable, EnumSqlType.bit, EnumCondition.Equal, address.usable); AddressData addressdata = new AddressData(); totalCount = this._addressclass.GetSingleT(addressdata, querybusinessparams); return(addressdata); #endregion }
/// <summary> /// 根据条件筛选所有BookFromCountry指定页码的数据(分页型) /// </summary> /// <param name="bookfromcountry">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityBookFromCountry bookfromcountry, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(BookFromCountryData.countryId, EnumSqlType.sqlint, EnumCondition.Equal, bookfromcountry.countryId); querybusinessparams.Add(BookFromCountryData.countryName, EnumSqlType.nvarchar, EnumCondition.Equal, bookfromcountry.countryName); querybusinessparams.Add(BookFromCountryData.usable, EnumSqlType.bit, EnumCondition.Equal, bookfromcountry.usable); querybusinessparams.Add(BookFromCountryData.sort, EnumSqlType.sqlint, EnumCondition.Equal, bookfromcountry.sort); BookFromCountryData bookfromcountrydata = new BookFromCountryData(); totalCount = this._bookfromcountryclass.GetSingleT(bookfromcountrydata, querybusinessparams); return(bookfromcountrydata); #endregion }
/// <summary> /// 根据条件筛选所有BookBelongTo指定页码的数据(分页型) /// </summary> /// <param name="bookbelongto">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntityBookBelongTo bookbelongto, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(BookBelongToData.belongtoId, EnumSqlType.sqlint, EnumCondition.Equal, bookbelongto.belongtoId); querybusinessparams.Add(BookBelongToData.fullname, EnumSqlType.nvarchar, EnumCondition.Equal, bookbelongto.fullname); querybusinessparams.Add(BookBelongToData.usable, EnumSqlType.bit, EnumCondition.Equal, bookbelongto.usable); querybusinessparams.Add(BookBelongToData.sort, EnumSqlType.sqlint, EnumCondition.Equal, bookbelongto.sort); BookBelongToData bookbelongdata = new BookBelongToData(); totalCount = this._bookbelongtoclass.GetSingleT(bookbelongdata, querybusinessparams); return(bookbelongdata); #endregion }
/// <summary> /// 根据条件筛选所有Group指定页码的数据(分页型) /// </summary> /// <param name="group">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public GroupData GetData(EntityGroup group, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(GroupData.gid, EnumSqlType.sqlint, EnumCondition.Equal, group.gid); querybusinessparams.Add(GroupData.uid, EnumSqlType.sqlint, EnumCondition.Equal, group.uid); querybusinessparams.Add(GroupData.groupName, EnumSqlType.nvarchar, EnumCondition.Equal, group.groupName); querybusinessparams.Add(GroupData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, group.writeTime); GroupData groupdata = new GroupData(); totalCount = this._groupclass.GetSingleT(groupdata, querybusinessparams); return(groupdata); #endregion }
/// <summary> /// 根据权限组获取菜单json(系统左边菜单列表显示) /// </summary> /// <param name="roleId"></param> /// <returns></returns> public string GetSystemMenuList(string roleId, string userId) { #region string menulistjson = ""; MenuClass menuclass = new MenuClass(); if (String.IsNullOrEmpty(roleId)) { return("{ topics:[]}"); } DBConditions queryconditions = new DBConditions(); queryconditions.Add(RoleControlMenuData.roleId, EnumSqlType.tinyint, EnumCondition.Equal, roleId); queryconditions.Add(MenuData.usable, EnumSqlType.bit, EnumCondition.Equal, true); DataSet menulistdata = menuclass.GetMenuByRole(queryconditions); menulistjson += string.Format("{{ roleId:'{0}',userid:'{1}', topics:[", roleId, userId); DataRow[] menucollect = menulistdata.Tables[0].Select(MenuData.parentId + " = 0"); foreach (DataRow dr in menucollect) { string treejson = ""; string currentmenuid = dr[MenuData.currentId].ToString(); this.iteratorSystemMenu(menulistdata, currentmenuid, ref treejson); menulistjson += "{menuid:'" + currentmenuid + "',menuname:'" + dr[MenuData.menuName].ToString() + "',children:[" + treejson; if (menulistdata.Tables[0].Select(MenuData.parentId + " = " + currentmenuid).Length == 0) { menulistjson += "]"; } menulistjson += "},"; } //去掉json中多余的逗号 if (menucollect.Length > 0) { menulistjson = menulistjson.Remove(menulistjson.Length - 1, 1); } menulistjson += "]}"; return(menulistjson); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="functionId">主键-功能点编号</param> /// <returns></returns> private MenuFunctionPointData getData(string functionId) { #region MenuFunctionPointData menufunctionpointdata = new MenuFunctionPointData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(MenuFunctionPointData.functionId, EnumSqlType.sqlint, EnumCondition.Equal, functionId); this._menufunctionpointclass.GetSingleTAllWithoutCount(menufunctionpointdata, querybusinessparams); return(menufunctionpointdata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="collectTypeId">主键-</param> /// <returns></returns> private ProjectCollectData getDataByCollectTypeId(string collectTypeId) { #region ProjectCollectData projectcollectdata = new ProjectCollectData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(ProjectCollectData.collectTypeId, EnumSqlType.sqlint, EnumCondition.Equal, collectTypeId); this._projectcollectclass.GetSingleT(projectcollectdata, querybusinessparams); return(projectcollectdata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="answerId">主键-选择题答案编号</param> /// <returns></returns> private ExamAnswerSelectData getData(string answerId) { #region ExamAnswerSelectData examanswerselectdata = new ExamAnswerSelectData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(ExamAnswerSelectData.answerId, EnumSqlType.sqlint, EnumCondition.Equal, answerId); this._examanswerselectclass.GetSingleTAllWithoutCount(examanswerselectdata, querybusinessparams); return(examanswerselectdata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="setId">主键-角色控制菜单-编号</param> /// <returns></returns> private RoleControlMenuData getData(string setId) { #region RoleControlMenuData rolecontrolmenudata = new RoleControlMenuData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(RoleControlMenuData.setId, EnumSqlType.sqlint, EnumCondition.Equal, setId); this._rolecontrolmenuclass.GetSingleTAllWithoutCount(rolecontrolmenudata, querybusinessparams); return(rolecontrolmenudata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="userid">主键-用户编号</param> /// <returns></returns> public ApplicationUserData getData(string userid) { #region ApplicationUserData applicationuserdata = new ApplicationUserData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(ApplicationUserData.userid, EnumSqlType.sqlint, EnumCondition.Equal, userid); this._applicationuserclass.GetSingleTAllWithoutCount(applicationuserdata, querybusinessparams); return(applicationuserdata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="examScoreId">主键-考卷比例编号</param> /// <returns></returns> private ExamScoreRateData getData(string examScoreId) { #region ExamScoreRateData examscoreratedata = new ExamScoreRateData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(ExamScoreRateData.examScoreId, EnumSqlType.sqlint, EnumCondition.Equal, examScoreId); this._examscorerateclass.GetSingleTAllWithoutCount(examscoreratedata, querybusinessparams); return(examscoreratedata); #endregion }
/// <summary> /// 根据条件筛选所有SystemRole指定页码的数据(分页型) /// </summary> /// <param name="systemrole">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public DataSet GetData(EntitySystemRole systemrole, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(SystemRoleData.roleId, EnumSqlType.tinyint, EnumCondition.Equal, systemrole.roleId); querybusinessparams.Add(SystemRoleData.roleName, EnumSqlType.nvarchar, EnumCondition.Equal, systemrole.roleName); querybusinessparams.Add(SystemRoleData.usable, EnumSqlType.bit, EnumCondition.Equal, systemrole.usable); querybusinessparams.Add(SystemRoleData.remark, EnumSqlType.nvarchar, EnumCondition.Equal, systemrole.remark); querybusinessparams.Add(SystemRoleData.sort, EnumSqlType.tinyint, EnumCondition.Equal, systemrole.sort); SystemRoleData systemroledata = new SystemRoleData(); totalCount = this._systemroleclass.GetSingleT(systemroledata, querybusinessparams); return(systemroledata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="currentId">主键-当前项目节点编号</param> /// <returns></returns> private WLOGProjectTreeData getData(string currentId) { #region WLOGProjectTreeData wlogprojecttreedata = new WLOGProjectTreeData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(WLOGProjectTreeData.currentId, EnumSqlType.sqlint, EnumCondition.Equal, currentId); this._wlogprojecttreeclass.GetSingleTAllWithoutCount(wlogprojecttreedata, querybusinessparams); return(wlogprojecttreedata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="fid">主键-朋友关系序号</param> /// <returns></returns> private FriendshipData getData(string fid) { #region FriendshipData friendshipdata = new FriendshipData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(FriendshipData.fid, EnumSqlType.sqlint, EnumCondition.Equal, fid); this._friendshipclass.GetSingleTAllWithoutCount(friendshipdata, querybusinessparams); return(friendshipdata); #endregion }
/// <summary> /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。 /// </summary> /// <param name="eventId">主键-事件编号</param> /// <returns></returns> private EventLogsData getData(string eventId) { #region EventLogsData eventlogsdata = new EventLogsData(); DBConditions querybusinessparams = new DBConditions(); querybusinessparams.Add(EventLogsData.eventId, EnumSqlType.sqlint, EnumCondition.Equal, eventId); this._eventlogsclass.GetSingleTAllWithoutCount(eventlogsdata, querybusinessparams); return(eventlogsdata); #endregion }
/// <summary> /// 根据条件筛选所有Friendship指定页码的数据(分页型) /// </summary> /// <param name="friendship">实体对象</param> /// <param name="pageparams">分页对象</param> /// <param name="totalCount">符合条件的记录总数量</param> /// <returns></returns> public FriendshipData GetData(EntityFriendship friendship, PageParams pageparams, out int totalCount) { #region DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Add(FriendshipData.fid, EnumSqlType.sqlint, EnumCondition.Equal, friendship.fid); querybusinessparams.Add(FriendshipData.meId, EnumSqlType.sqlint, EnumCondition.Equal, friendship.meId); querybusinessparams.Add(FriendshipData.friendId, EnumSqlType.sqlint, EnumCondition.Equal, friendship.friendId); querybusinessparams.Add(FriendshipData.gid, EnumSqlType.sqlint, EnumCondition.Equal, friendship.gid); querybusinessparams.Add(FriendshipData.writeTime, EnumSqlType.datetime, EnumCondition.Equal, friendship.writeTime); FriendshipData friendshipdata = new FriendshipData(); totalCount = this._friendshipclass.GetSingleT(friendshipdata, querybusinessparams); return(friendshipdata); #endregion }