Exemplo n.º 1
0
        public void Comment_OnClick(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(TbCommentRemark.Text))
                {
                    LtlMessage.Text = Utils.GetMessageHtml("批示失败,必须填写意见", false);
                    return;
                }

                var remarkInfo = new RemarkInfo(0, SiteId, _contentInfo.ChannelId, _contentInfo.Id, ERemarkTypeUtils.GetValue(ERemarkType.Comment), TbCommentRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                RemarkDao.Insert(remarkInfo);

                ApplyManager.Log(SiteId, _contentInfo.ChannelId, _contentInfo.Id, ELogTypeUtils.GetValue(ELogType.Comment), AuthRequest.AdminName, _adminInfo.DepartmentId);

                LtlMessage.Text = Utils.GetMessageHtml("办件批示成功", true);

                if (!ConfigInfo.ApplyIsOpenWindow)
                {
                    Utils.SwalSuccess("办件批示成功", "", "确 认", $"location.href = '{ListPageUrl}'");
                }
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
            }
        }
Exemplo n.º 2
0
        public void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

            try
            {
                if (string.IsNullOrEmpty(tbCommentRemark.Text))
                {
                    LtlMessage.Text = Utils.GetMessageHtml("批示失败,必须填写意见!", false);
                    return;
                }

                foreach (int contentID in _idArrayList)
                {
                    var remarkInfo = new RemarkInfo(0, SiteId, _channelId, contentID, ERemarkTypeUtils.GetValue(ERemarkType.Comment), tbCommentRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                    RemarkDao.Insert(remarkInfo);

                    ApplyManager.Log(SiteId, _channelId, contentID, ELogTypeUtils.GetValue(ELogType.Comment), AuthRequest.AdminName, _adminInfo.DepartmentId);
                }

                isChanged = true;
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
                isChanged       = false;
            }

            if (isChanged)
            {
                LayerUtils.Close(Page);
            }
        }
Exemplo n.º 3
0
        public void Redo_OnClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TbRedoRemark.Text))
            {
                LtlMessage.Text = Utils.GetMessageHtml("要求返工失败,必须填写意见!", false);
                return;
            }
            try
            {
                var contentInfo = Main.ContentApi.GetContentInfo(SiteId, _channelId, _contentId);

                var remarkInfo = new RemarkInfo(0, SiteId, contentInfo.ChannelId, contentInfo.Id, ERemarkTypeUtils.GetValue(ERemarkType.Redo), TbRedoRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                RemarkDao.Insert(remarkInfo);

                ApplyManager.Log(SiteId, contentInfo.ChannelId, contentInfo.Id, ELogTypeUtils.GetValue(ELogType.Redo), AuthRequest.AdminName, _adminInfo.DepartmentId);

                contentInfo.Set(ContentAttribute.State, EStateUtils.GetValue(EState.Redo));
                Main.ContentApi.Update(SiteId, contentInfo.ChannelId, contentInfo);

                LtlMessage.Text = Utils.GetMessageHtml("要求返工成功", true);

                var configInfo = Main.GetConfigInfo(SiteId);

                if (!configInfo.ApplyIsOpenWindow)
                {
                    Utils.Redirect(_returnUrl);
                }
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
            }
        }
Exemplo n.º 4
0
        public void Translate_OnClick(object sender, EventArgs e)
        {
            var translateChannelId = Utils.ToInt(DdlTranslateChannelId.SelectedValue);

            if (translateChannelId == 0)
            {
                LtlMessage.Text = Utils.GetMessageHtml("转移失败,必须选择转移目标", false);
                return;
            }
            try
            {
                _contentInfo.Set(ContentAttribute.TranslateFromChannelId, _contentInfo.ChannelId.ToString());
                _contentInfo.ChannelId = translateChannelId;
                Main.ContentApi.Update(SiteId, _contentInfo.ChannelId, _contentInfo);

                if (!string.IsNullOrEmpty(TbTranslateRemark.Text))
                {
                    var remarkInfo = new RemarkInfo(0, SiteId, _contentInfo.ChannelId, _contentInfo.Id, ERemarkTypeUtils.GetValue(ERemarkType.Translate), TbTranslateRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                    RemarkDao.Insert(remarkInfo);
                }

                ApplyManager.LogTranslate(SiteId, _contentInfo.ChannelId, _contentInfo.Id, Main.ChannelApi.GetChannelName(SiteId, _contentInfo.ChannelId), AuthRequest.AdminName, _adminInfo.DepartmentId);

                LtlMessage.Text = Utils.GetMessageHtml("办件转移成功", true);

                if (!ConfigInfo.ApplyIsOpenWindow)
                {
                    Utils.SwalSuccess("办件转移成功", "", "确 认", $"location.href = '{ListPageUrl}'");
                }
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
            }
        }
Exemplo n.º 5
0
        public void SwitchTo_OnClick(object sender, EventArgs e)
        {
            var switchToDepartmentId = Utils.ToInt(Request.Form["switchToDepartmentId"]);

            if (switchToDepartmentId == 0)
            {
                LtlMessage.Text = Utils.GetMessageHtml("转办失败,必须选择转办部门", false);
                return;
            }
            var switchToDepartmentName = DepartmentManager.GetDepartmentName(switchToDepartmentId);

            try
            {
                ContentDao.UpdateDepartmentId(SiteId, _contentInfo.ChannelId, _contentInfo.Id, switchToDepartmentId);

                var remarkInfo = new RemarkInfo(0, SiteId, _contentInfo.ChannelId, _contentInfo.Id, ERemarkTypeUtils.GetValue(ERemarkType.SwitchTo), TbSwitchToRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                RemarkDao.Insert(remarkInfo);

                ApplyManager.LogSwitchTo(SiteId, _contentInfo.ChannelId, _contentInfo.Id, switchToDepartmentName, AuthRequest.AdminName, _adminInfo.DepartmentId);

                LtlMessage.Text = Utils.GetMessageHtml("办件转办成功", true);

                if (!ConfigInfo.ApplyIsOpenWindow)
                {
                    Utils.SwalSuccess("办件转办成功", "", "确 认", $"location.href = '{ListPageUrl}'");
                }
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
            }
        }
Exemplo n.º 6
0
        public void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

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

                foreach (int contentID in _idArrayList)
                {
                    var contentInfo = Main.ContentApi.GetContentInfo(SiteId, _channelId, contentID);
                    var state       = EStateUtils.GetEnumType(contentInfo.GetString(ContentAttribute.State));

                    if (state != EState.Denied && state != EState.Checked)
                    {
                        contentInfo.Set(ContentAttribute.DepartmentId, switchToDepartmentID.ToString());
                        Main.ContentApi.Update(SiteId, contentInfo.ChannelId, contentInfo);

                        if (!string.IsNullOrEmpty(tbSwitchToRemark.Text))
                        {
                            var remarkInfo = new RemarkInfo(0, SiteId, contentInfo.ChannelId, contentID, ERemarkTypeUtils.GetValue(ERemarkType.SwitchTo), tbSwitchToRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                            RemarkDao.Insert(remarkInfo);
                        }

                        ApplyManager.LogSwitchTo(SiteId, contentInfo.ChannelId, contentID, switchToDepartmentName, AuthRequest.AdminName, _adminInfo.DepartmentId);
                    }
                }

                isChanged = true;
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
                isChanged       = false;
            }

            if (isChanged)
            {
                LayerUtils.Close(Page);
            }
        }
Exemplo n.º 7
0
        public void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

            try
            {
                var translateNodeID = Utils.ToInt(ddlNodeID.SelectedValue);
                if (translateNodeID == 0)
                {
                    LtlMessage.Text = Utils.GetMessageHtml("转移失败,必须选择转移目标!", false);
                    return;
                }

                var chananelInfo = Main.ChannelApi.GetChannelInfo(SiteId, _channelId);

                foreach (int contentID in _idArrayList)
                {
                    var contentInfo = Main.ContentApi.GetContentInfo(SiteId, _channelId, contentID);
                    contentInfo.Set(ContentAttribute.TranslateFromChannelId, contentInfo.ChannelId.ToString());
                    contentInfo.ChannelId = translateNodeID;

                    Main.ContentApi.Update(SiteId, contentInfo.ChannelId, contentInfo);

                    if (!string.IsNullOrEmpty(tbTranslateRemark.Text))
                    {
                        var remarkInfo = new RemarkInfo(0, SiteId, contentInfo.ChannelId, contentID, ERemarkTypeUtils.GetValue(ERemarkType.Translate), tbTranslateRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                        RemarkDao.Insert(remarkInfo);
                    }

                    ApplyManager.LogTranslate(SiteId, contentInfo.ChannelId, contentID, chananelInfo.ChannelName, AuthRequest.AdminName, _adminInfo.DepartmentId);
                }

                isChanged = true;
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
                isChanged       = false;
            }

            if (isChanged)
            {
                LayerUtils.Close(Page);
            }
        }
Exemplo n.º 8
0
        public void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

            try
            {
                if (string.IsNullOrEmpty(tbRedoRemark.Text))
                {
                    LtlMessage.Text = Utils.GetMessageHtml("要求返工失败,必须填写意见!", false);
                    return;
                }

                foreach (int contentID in _idArrayList)
                {
                    var contentInfo = Main.ContentApi.GetContentInfo(SiteId, _channelId, contentID);
                    var state       = EStateUtils.GetEnumType(contentInfo.GetString(ContentAttribute.State));

                    if (state == EState.Replied || state == EState.Redo)
                    {
                        var remarkInfo = new RemarkInfo(0, SiteId, contentInfo.ChannelId, contentInfo.Id, ERemarkTypeUtils.GetValue(ERemarkType.Redo), tbRedoRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);
                        RemarkDao.Insert(remarkInfo);

                        ApplyManager.Log(SiteId, contentInfo.ChannelId, contentID, ELogTypeUtils.GetValue(ELogType.Redo), AuthRequest.AdminName, _adminInfo.DepartmentId);
                        contentInfo.Set(ContentAttribute.State, EStateUtils.GetValue(EState.Redo));
                        Main.ContentApi.Update(SiteId, contentInfo.ChannelId, contentInfo);
                    }
                }

                isChanged = true;
            }
            catch (Exception ex)
            {
                LtlMessage.Text = Utils.GetMessageHtml(ex.Message, false);
                isChanged       = false;
            }

            if (isChanged)
            {
                LayerUtils.Close(Page);
            }
        }
Exemplo n.º 9
0
        public void Accept_OnClick(object sender, EventArgs e)
        {
            var contentInfo = Main.ContentApi.GetContentInfo(SiteId, _channelId, _contentId);

            var remarkInfo = new RemarkInfo(0, SiteId, contentInfo.ChannelId, contentInfo.Id, ERemarkTypeUtils.GetValue(ERemarkType.Accept), TbAcceptRemark.Text, _adminInfo.DepartmentId, AuthRequest.AdminName, DateTime.Now);

            RemarkDao.Insert(remarkInfo);

            ApplyManager.Log(SiteId, contentInfo.ChannelId, contentInfo.Id, ELogTypeUtils.GetValue(ELogType.Accept), AuthRequest.AdminName, _adminInfo.DepartmentId);

            contentInfo.Set(ContentAttribute.State, EStateUtils.GetValue(EState.Accepted));
            Main.ContentApi.Update(SiteId, contentInfo.ChannelId, contentInfo);

            LtlMessage.Text = Utils.GetMessageHtml("申请受理成功", true);

            var configInfo = Main.GetConfigInfo(SiteId);

            if (!configInfo.ApplyIsOpenWindow)
            {
                Utils.Redirect(_returnUrl);
            }
        }