Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
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(\'办件转办成功!\');");
            }
        }