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 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 void Redo_OnClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(tbRedoRemark.Text)) { FailMessage("要求返工失败,必须填写意见"); return; } try { var remarkInfo = new GovInteractRemarkInfo(0, PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractRemarkType.Redo, tbRedoRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now); DataProvider.GovInteractRemarkDao.Insert(remarkInfo); GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Redo, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentInfo.Id, EGovInteractState.Redo); 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 { if (string.IsNullOrEmpty(tbCommentRemark.Text)) { FailMessage("批示失败,必须填写意见"); return; } foreach (int contentID in _idArrayList) { var nodeID = DataProvider.GovInteractContentDao.GetNodeId(PublishmentSystemInfo, contentID); var remarkInfo = new GovInteractRemarkInfo(0, PublishmentSystemId, nodeID, contentID, EGovInteractRemarkType.Comment, tbCommentRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now); DataProvider.GovInteractRemarkDao.Insert(remarkInfo); GovInteractApplyManager.Log(PublishmentSystemId, nodeID, contentID, EGovInteractLogType.Comment, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); } isChanged = true; } catch (Exception ex) { FailMessage(ex, ex.Message); isChanged = false; } if (isChanged) { PageUtils.CloseModalPage(Page, "alert(\'批示成功!\');"); } }
public void Check_OnClick(object sender, EventArgs e) { try { GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Check, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentInfo.Id, EGovInteractState.Checked); SuccessMessage("审核申请成功"); if (!PublishmentSystemInfo.Additional.GovInteractApplyIsOpenWindow) { AddWaitAndRedirectScript(ListPageUrl); } } catch (Exception ex) { FailMessage(ex, ex.Message); } }
public void Accept_OnClick(object sender, EventArgs e) { try { var remarkInfo = new GovInteractRemarkInfo(0, PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractRemarkType.Accept, tbAcceptRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now); DataProvider.GovInteractRemarkDao.Insert(remarkInfo); GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Accept, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentInfo.Id, EGovInteractState.Accepted); SuccessMessage("申请受理成功"); if (!PublishmentSystemInfo.Additional.GovInteractApplyIsOpenWindow) { AddWaitAndRedirectScript(ListPageUrl); } } catch (Exception ex) { FailMessage(ex, ex.Message); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); PageUtils.CheckRequestParameter("PublishmentSystemID", "NodeID"); nodeID = TranslateUtils.ToInt(Request.QueryString["NodeID"]); isPermissionReply = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractReply); isPermissionEdit = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractEdit); if (Body.IsQueryExists("Delete")) { var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]); if (arraylist.Count > 0) { try { DataProvider.ContentDao.DeleteContents(PublishmentSystemId, PublishmentSystemInfo.AuxiliaryTableForGovInteract, arraylist, nodeID); Body.AddSiteLog(PublishmentSystemId, "删除申请", Body.AdministratorName); SuccessMessage("删除成功!"); } catch (Exception ex) { FailMessage(ex, "删除失败!"); } } } else if (Body.IsQueryExists("Accept")) { var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]); foreach (var contentId in arraylist) { var contentInfo = DataProvider.GovInteractContentDao.GetContentInfo(PublishmentSystemInfo, contentId); if (contentInfo.State == EGovInteractState.New || contentInfo.State == EGovInteractState.Denied) { GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Accept, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentInfo.Id, EGovInteractState.Accepted); } } SuccessMessage("受理申请成功!"); } else if (Body.IsQueryExists("Deny")) { var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]); foreach (var contentId in arraylist) { var contentInfo = DataProvider.GovInteractContentDao.GetContentInfo(PublishmentSystemInfo, contentId); if (contentInfo.State == EGovInteractState.New || contentInfo.State == EGovInteractState.Accepted) { GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Deny, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentId, EGovInteractState.Denied); } } SuccessMessage("拒绝受理申请成功!"); } else if (Body.IsQueryExists("Check")) { var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]); foreach (var contentId in arraylist) { var contentInfo = DataProvider.GovInteractContentDao.GetContentInfo(PublishmentSystemInfo, contentId); if (contentInfo.State == EGovInteractState.Replied) { GovInteractApplyManager.Log(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractLogType.Check, Body.AdministratorName, Body.AdministratorInfo.DepartmentId); DataProvider.GovInteractContentDao.UpdateState(PublishmentSystemInfo, contentId, EGovInteractState.Checked); } } SuccessMessage("审核申请成功!"); } spContents.ControlToPaginate = rptContents; spContents.ItemsPerPage = PublishmentSystemInfo.Additional.PageSize; spContents.SelectCommand = GetSelectString(); spContents.SortField = ContentAttribute.Taxis; spContents.SortMode = GetSortMode(); rptContents.ItemDataBound += rptContents_ItemDataBound; if (!IsPostBack) { spContents.DataBind(); ltlTotalCount.Text = spContents.TotalCount.ToString(); if (phAccept != null) { phAccept.Visible = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractAccept); if (hlAccept != null) { hlAccept.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUrl + "&Accept=True", "IDCollection", "IDCollection", "请选择需要受理的申请!", "此操作将受理所选申请,确定吗?")); } if (hlDeny != null) { hlDeny.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUrl + "&Deny=True", "IDCollection", "IDCollection", "请选择需要拒绝的申请!", "此操作将拒绝受理所选申请,确定吗?")); } } if (phCheck != null) { phCheck.Visible = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractCheck); if (hlCheck != null) { hlCheck.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUrl + "&Check=True", "IDCollection", "IDCollection", "请选择需要审核的申请!", "此操作将审核所选申请,确定吗?")); } if (hlRedo != null) { hlRedo.Attributes.Add("onclick", ModalGovInteractApplyRedo.GetOpenWindowString(PublishmentSystemId)); } } if (phSwitchToTranslate != null) { phSwitchToTranslate.Visible = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractSwitchToTranslate); if (hlSwitchTo != null) { hlSwitchTo.Attributes.Add("onclick", ModalGovInteractApplySwitchTo.GetOpenWindowString(PublishmentSystemId, nodeID)); } if (hlTranslate != null) { hlTranslate.Attributes.Add("onclick", ModalGovInteractApplyTranslate.GetOpenWindowString(PublishmentSystemId, nodeID)); } } if (phComment != null) { phComment.Visible = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractComment); hlComment.Attributes.Add("onclick", ModalGovInteractApplyComment.GetOpenWindowString(PublishmentSystemId)); } if (phDelete != null) { phDelete.Visible = GovInteractManager.IsPermission(PublishmentSystemId, nodeID, AppManager.Wcm.Permission.GovInteract.GovInteractDelete) && PublishmentSystemInfo.Additional.GovInteractApplyIsDeleteAllowed; hlDelete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUrl + "&Delete=True", "IDCollection", "IDCollection", "请选择需要删除的申请!", "此操作将删除所选申请,确定吗?")); } if (hlExport != null) { hlExport.Attributes.Add("onclick", ModalContentExport.GetOpenWindowString(PublishmentSystemId, nodeID)); } } }