public void Translate_OnClick(object sender, EventArgs e)
        {
            var translateNodeID = TranslateUtils.ToInt(ddlTranslateNodeID.SelectedValue);

            if (translateNodeID == 0)
            {
                FailMessage("转移失败,必须选择转移目标");
                return;
            }
            try
            {
                contentInfo.SetExtendedAttribute(GovInteractContentAttribute.TranslateFromNodeId, contentInfo.NodeId.ToString());
                contentInfo.NodeId = translateNodeID;
                DataProvider.ContentDao.Update(PublishmentSystemInfo.AuxiliaryTableForGovInteract, PublishmentSystemInfo, contentInfo);

                if (!string.IsNullOrEmpty(tbTranslateRemark.Text))
                {
                    var remarkInfo = new GovInteractRemarkInfo(0, PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractRemarkType.Translate, tbTranslateRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                    DataProvider.GovInteractRemarkDao.Insert(remarkInfo);
                }

                GovInteractApplyManager.LogTranslate(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, NodeManager.GetNodeName(PublishmentSystemId, contentInfo.NodeId), Body.AdministratorName, Body.AdministratorInfo.DepartmentId);

                SuccessMessage("办件转移成功");
                if (!PublishmentSystemInfo.Additional.GovInteractApplyIsOpenWindow)
                {
                    AddWaitAndRedirectScript(ListPageUrl);
                }
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }
        }
Example #2
0
        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 void SwitchTo_OnClick(object sender, EventArgs e)
        {
            var switchToDepartmentID = TranslateUtils.ToInt(Request.Form["switchToDepartmentID"]);

            if (switchToDepartmentID == 0)
            {
                FailMessage("转办失败,必须选择转办部门");
                return;
            }
            var switchToDepartmentName = DepartmentManager.GetDepartmentName(switchToDepartmentID);

            try
            {
                DataProvider.GovInteractContentDao.UpdateDepartmentId(PublishmentSystemInfo, contentInfo.Id, switchToDepartmentID);

                var remarkInfo = new GovInteractRemarkInfo(0, PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, EGovInteractRemarkType.SwitchTo, tbSwitchToRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                DataProvider.GovInteractRemarkDao.Insert(remarkInfo);

                GovInteractApplyManager.LogSwitchTo(PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, switchToDepartmentName, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);

                SuccessMessage("办件转办成功");
                if (!PublishmentSystemInfo.Additional.GovInteractApplyIsOpenWindow)
                {
                    AddWaitAndRedirectScript(ListPageUrl);
                }
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }
        }
Example #4
0
        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(\'批示成功!\');");
            }
        }
Example #5
0
 public GovInteractContentInfo()
 {
     DepartmentName = string.Empty;
     QueryCode      = GovInteractApplyManager.GetQueryCode();
     State          = EGovInteractState.New;
     IpAddress      = PageUtils.GetIpAddress();
     AddDate        = DateTime.Now;
 }
Example #6
0
        public void Main(int publishmentSystemId, int nodeId, int styleId)
        {
            var body = new RequestBody();

            var publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId);

            var tagStyleInfo = TagStyleManager.GetTagStyleInfo(styleId) ?? new TagStyleInfo();
            var tagStyleGovInteractApplyInfo = new TagStyleGovInteractApplyInfo(tagStyleInfo.SettingsXML);

            try
            {
                if (!tagStyleGovInteractApplyInfo.IsAnomynous && !body.IsUserLoggin)
                {
                    throw new Exception("请先登录系统!");
                }

                var contentInfo = DataProvider.GovInteractContentDao.GetContentInfo(publishmentSystemInfo, nodeId, HttpContext.Current.Request.Form);

                if (HttpContext.Current.Request.Files.Count > 0)
                {
                    foreach (var attributeName in HttpContext.Current.Request.Files.AllKeys)
                    {
                        var myFile = HttpContext.Current.Request.Files[attributeName];
                        if (myFile != null && "" != myFile.FileName)
                        {
                            var fileUrl = UploadFile(publishmentSystemInfo, myFile);
                            contentInfo.SetExtendedAttribute(attributeName, fileUrl);
                        }
                    }
                }

                var contentId = DataProvider.ContentDao.Insert(publishmentSystemInfo.AuxiliaryTableForGovInteract, publishmentSystemInfo, contentInfo);

                var realName         = contentInfo.RealName;
                var toDepartmentName = string.Empty;
                if (contentInfo.DepartmentId > 0)
                {
                    toDepartmentName = "至" + contentInfo.DepartmentName;
                }
                GovInteractApplyManager.LogNew(publishmentSystemId, nodeId, contentId, realName, toDepartmentName);

                MessageManager.SendSMS(publishmentSystemInfo, tagStyleGovInteractApplyInfo, ETableStyle.GovInteractContent, publishmentSystemInfo.AuxiliaryTableForGovInteract, nodeId, contentInfo);

                HttpContext.Current.Response.Write(GovInteractApplyTemplate.GetCallbackScript(publishmentSystemInfo, nodeId, true, contentInfo.QueryCode, string.Empty));
            }
            catch (Exception ex)
            {
                //HttpContext.Current.Response.Write(GovInteractApplyTemplate.GetCallbackScript(publishmentSystemInfo, nodeId, false, string.Empty, ex.Message));
                HttpContext.Current.Response.Write(GovInteractApplyTemplate.GetCallbackScript(publishmentSystemInfo, nodeId, false, string.Empty, "程序错误"));
            }

            HttpContext.Current.Response.End();
        }
Example #7
0
        public override void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

            try
            {
                var switchToDepartmentID = TranslateUtils.ToInt(Request.Form["switchToDepartmentID"]);
                if (switchToDepartmentID == 0)
                {
                    FailMessage("转办失败,必须选择转办部门");
                    return;
                }
                var switchToDepartmentName = DepartmentManager.GetDepartmentName(switchToDepartmentID);

                foreach (int contentID in _idArrayList)
                {
                    var contentInfo = DataProvider.GovInteractContentDao.GetContentInfo(PublishmentSystemInfo, contentID);
                    if (contentInfo.State != EGovInteractState.Denied && contentInfo.State != EGovInteractState.Checked)
                    {
                        DataProvider.GovInteractContentDao.UpdateDepartmentId(PublishmentSystemInfo, contentID, switchToDepartmentID);

                        if (!string.IsNullOrEmpty(tbSwitchToRemark.Text))
                        {
                            var remarkInfo = new GovInteractRemarkInfo(0, PublishmentSystemId, contentInfo.NodeId, contentID, EGovInteractRemarkType.SwitchTo, tbSwitchToRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                            DataProvider.GovInteractRemarkDao.Insert(remarkInfo);
                        }

                        GovInteractApplyManager.LogSwitchTo(PublishmentSystemId, contentInfo.NodeId, contentID, switchToDepartmentName, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                    }
                }

                isChanged = true;
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
                isChanged = false;
            }

            if (isChanged)
            {
                PageUtils.CloseModalPage(Page, "alert(\'办件转办成功!\');");
            }
        }