public void Deny_OnClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(tbDenyReply.Text)) { FailMessage("拒绝失败,必须填写拒绝理由"); return; } try { DataProvider.GovInteractReplyDao.DeleteByContentId(PublishmentSystemId, contentInfo.Id); var replyInfo = new GovInteractReplyInfo(0, PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, tbDenyReply.Text, string.Empty, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now); DataProvider.GovInteractReplyDao.Insert(replyInfo); GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Deny, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentInfo.Id, EGovInteractState.Denied); SuccessMessage("拒绝申请成功"); if (!PublishmentSystemInfo.Additional.GovInteractApplyIsOpenWindow) { AddWaitAndRedirectScript(ListPageUrl); } } catch (Exception ex) { FailMessage(ex, ex.Message); } }
public override void Submit_OnClick(object sender, EventArgs e) { var isChanged = false; try { DataProvider.GovInteractReplyDao.DeleteByContentId(PublishmentSystemId, _contentInfo.Id); var fileUrl = UploadFile(htmlFileUrl.PostedFile); var replyInfo = new GovInteractReplyInfo(0, PublishmentSystemId, _contentInfo.NodeId, _contentInfo.Id, tbReply.Text, fileUrl, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now); DataProvider.GovInteractReplyDao.Insert(replyInfo); GovInteractApplyManager.Log(PublishmentSystemId, _contentInfo.NodeId, _contentInfo.Id, EGovInteractLogType.Reply, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); if (Body.AdministratorInfo.DepartmentId > 0) { DataProvider.GovInteractContentDao.UpdateDepartmentId(PublishmentSystemInfo, _contentInfo.Id, Body.AdministratorInfo.DepartmentId); } DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, _contentInfo.Id, EGovInteractState.Replied); isChanged = true; } catch (Exception ex) { FailMessage(ex, ex.Message); isChanged = false; } if (isChanged) { PageUtils.CloseModalPage(Page, "alert(\'办件回复成功!\');"); } }
public void Insert(GovInteractReplyInfo replyInfo) { var sqlString = "INSERT INTO wcm_GovInteractReply(PublishmentSystemID, NodeID, ContentID, Reply, FileUrl, DepartmentID, UserName, AddDate) VALUES (@PublishmentSystemID, @NodeID, @ContentID, @Reply, @FileUrl, @DepartmentID, @UserName, @AddDate)"; var parms = new IDataParameter[] { GetParameter(ParmPublishmentsystemid, EDataType.Integer, replyInfo.PublishmentSystemID), GetParameter(ParmNodeId, EDataType.Integer, replyInfo.NodeID), GetParameter(ParmContentId, EDataType.Integer, replyInfo.ContentID), GetParameter(ParmReply, EDataType.NText, replyInfo.Reply), GetParameter(ParmFileUrl, EDataType.NVarChar, 255, replyInfo.FileUrl), GetParameter(ParmDepartmentId, EDataType.Integer, replyInfo.DepartmentID), GetParameter(ParmUserName, EDataType.VarChar, 50, replyInfo.UserName), GetParameter(ParmAddDate, EDataType.DateTime, replyInfo.AddDate) }; ExecuteNonQuery(sqlString, parms); }
public GovInteractReplyInfo GetReplyInfo(int replayId) { GovInteractReplyInfo replyInfo = null; var parms = new IDataParameter[] { GetParameter(ParmReplyId, EDataType.Integer, replayId) }; using (var rdr = ExecuteReader(SqlSelect, parms)) { if (rdr.Read()) { var i = 0; replyInfo = new GovInteractReplyInfo(GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetString(rdr, i++), GetString(rdr, i++), GetInt(rdr, i++), GetString(rdr, i++), GetDateTime(rdr, i)); } rdr.Close(); } return(replyInfo); }
public GovInteractReplyInfo GetReplyInfoByContentId(int publishmentSystemId, int contentId) { GovInteractReplyInfo replyInfo = null; var parms = new IDataParameter[] { GetParameter(ParmPublishmentsystemid, EDataType.Integer, publishmentSystemId), GetParameter(ParmContentId, EDataType.Integer, contentId) }; using (var rdr = ExecuteReader(SqlSelectByContentId, parms)) { if (rdr.Read()) { var i = 0; replyInfo = new GovInteractReplyInfo(GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetString(rdr, i++), GetString(rdr, i++), GetInt(rdr, i++), GetString(rdr, i++), GetDateTime(rdr, i)); } rdr.Close(); } return(replyInfo); }