Esempio n. 1
0
        public override void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

            try
            {
                if (string.IsNullOrEmpty(tbCommentRemark.Text))
                {
                    FailMessage("批示失败,必须填写意见");
                    return;
                }

                foreach (int applyID in _idArrayList)
                {
                    var remarkInfo = new GovPublicApplyRemarkInfo(0, PublishmentSystemId, applyID, EGovPublicApplyRemarkType.Comment, tbCommentRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                    DataProvider.GovPublicApplyRemarkDao.Insert(remarkInfo);

                    GovPublicApplyManager.Log(PublishmentSystemId, applyID, EGovPublicApplyLogType.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 Reply_OnClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbReply.Text))
            {
                FailMessage("回复失败,必须填写答复内容");
                return;
            }
            try
            {
                DataProvider.GovPublicApplyReplyDao.DeleteByApplyId(applyInfo.Id);
                var fileUrl   = string.Empty;
                var replyInfo = new GovPublicApplyReplyInfo(0, PublishmentSystemId, applyInfo.Id, tbReply.Text, fileUrl, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                DataProvider.GovPublicApplyReplyDao.Insert(replyInfo);

                GovPublicApplyManager.Log(PublishmentSystemId, applyInfo.Id, EGovPublicApplyLogType.Reply, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                DataProvider.GovPublicApplyDao.UpdateState(applyInfo.Id, EGovPublicApplyState.Replied);

                SuccessMessage("申请回复成功");

                AddWaitAndRedirectScript(ListPageUrl);
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }
        }
Esempio n. 3
0
 public void Check_OnClick(object sender, EventArgs e)
 {
     try
     {
         GovPublicApplyManager.Log(PublishmentSystemId, applyInfo.Id, EGovPublicApplyLogType.Check, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
         DataProvider.GovPublicApplyDao.UpdateState(applyInfo.Id, EGovPublicApplyState.Checked);
         SuccessMessage("审核申请成功");
         AddWaitAndRedirectScript(ListPageUrl);
     }
     catch (Exception ex)
     {
         FailMessage(ex, ex.Message);
     }
 }
Esempio n. 4
0
        public void Accept_OnClick(object sender, EventArgs e)
        {
            try
            {
                var remarkInfo = new GovPublicApplyRemarkInfo(0, PublishmentSystemId, applyInfo.Id, EGovPublicApplyRemarkType.Accept, tbAcceptRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                DataProvider.GovPublicApplyRemarkDao.Insert(remarkInfo);

                GovPublicApplyManager.Log(PublishmentSystemId, applyInfo.Id, EGovPublicApplyLogType.Accept, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                DataProvider.GovPublicApplyDao.UpdateState(applyInfo.Id, EGovPublicApplyState.Accepted);
                SuccessMessage("申请受理成功");

                AddWaitAndRedirectScript(ListPageUrl);
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }
        }
Esempio n. 5
0
        public void Redo_OnClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbRedoRemark.Text))
            {
                FailMessage("要求返工失败,必须填写意见");
                return;
            }
            try
            {
                var remarkInfo = new GovPublicApplyRemarkInfo(0, PublishmentSystemId, applyInfo.Id, EGovPublicApplyRemarkType.Redo, tbRedoRemark.Text, Body.AdministratorInfo.DepartmentId, Body.AdministratorName, DateTime.Now);
                DataProvider.GovPublicApplyRemarkDao.Insert(remarkInfo);

                GovPublicApplyManager.Log(PublishmentSystemId, applyInfo.Id, EGovPublicApplyLogType.Redo, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                DataProvider.GovPublicApplyDao.UpdateState(applyInfo.Id, EGovPublicApplyState.Redo);

                SuccessMessage("要求返工成功");

                AddWaitAndRedirectScript(ListPageUrl);
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }
        }
Esempio n. 6
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            PageUtils.CheckRequestParameter("PublishmentSystemID");

            if (Body.IsQueryExists("Delete"))
            {
                var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (arraylist.Count > 0)
                {
                    try
                    {
                        DataProvider.GovPublicApplyDao.Delete(arraylist);
                        Body.AddSiteLog(PublishmentSystemId, "删除申请");
                        SuccessMessage("删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "删除失败!");
                    }
                }
            }
            else if (Body.IsQueryExists("Accept"))
            {
                var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                foreach (var applyId in arraylist)
                {
                    var state = DataProvider.GovPublicApplyDao.GetState(applyId);
                    if (state == EGovPublicApplyState.New || state == EGovPublicApplyState.Denied)
                    {
                        GovPublicApplyManager.Log(PublishmentSystemId, applyId, EGovPublicApplyLogType.Accept, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                        DataProvider.GovPublicApplyDao.UpdateState(applyId, EGovPublicApplyState.Accepted);
                    }
                }
                SuccessMessage("受理申请成功!");
            }
            else if (Body.IsQueryExists("Deny"))
            {
                var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                foreach (var applyId in arraylist)
                {
                    var state = DataProvider.GovPublicApplyDao.GetState(applyId);
                    if (state == EGovPublicApplyState.New || state == EGovPublicApplyState.Accepted)
                    {
                        GovPublicApplyManager.Log(PublishmentSystemId, applyId, EGovPublicApplyLogType.Deny, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                        DataProvider.GovPublicApplyDao.UpdateState(applyId, EGovPublicApplyState.Denied);
                    }
                }
                SuccessMessage("拒绝受理申请成功!");
            }
            else if (Body.IsQueryExists("Check"))
            {
                var arraylist = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                foreach (var applyId in arraylist)
                {
                    var state = DataProvider.GovPublicApplyDao.GetState(applyId);
                    if (state == EGovPublicApplyState.Replied)
                    {
                        GovPublicApplyManager.Log(PublishmentSystemId, applyId, EGovPublicApplyLogType.Check, Body.AdministratorName, Body.AdministratorInfo.DepartmentId);
                        DataProvider.GovPublicApplyDao.UpdateState(applyId, EGovPublicApplyState.Checked);
                    }
                }
                SuccessMessage("审核申请成功!");
            }

            spContents.ControlToPaginate = rptContents;
            spContents.ItemsPerPage      = PublishmentSystemInfo.Additional.PageSize;
            spContents.SelectCommand     = GetSelectString();
            spContents.SortField         = DataProvider.GovPublicApplyDao.GetSortFieldName();
            spContents.SortMode          = GetSortMode();
            rptContents.ItemDataBound   += rptContents_ItemDataBound;

            if (!IsPostBack)
            {
                spContents.DataBind();
                ltlTotalCount.Text = spContents.TotalCount.ToString();

                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 (hlCheck != null)
                {
                    hlCheck.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUrl + "&Check=True", "IDCollection", "IDCollection", "请选择需要审核的申请!", "此操作将审核所选申请,确定吗?"));
                }
                if (hlRedo != null)
                {
                    hlRedo.Attributes.Add("onclick", ModalGovPublicApplyRedo.GetOpenWindowString(PublishmentSystemId));
                }
                if (hlSwitchTo != null)
                {
                    hlSwitchTo.Attributes.Add("onclick", ModalGovPublicApplySwitchTo.GetOpenWindowString(PublishmentSystemId));
                }
                if (hlComment != null)
                {
                    hlComment.Attributes.Add("onclick", ModalGovPublicApplyComment.GetOpenWindowString(PublishmentSystemId));
                }
                if (phDelete != null)
                {
                    phDelete.Visible = PublishmentSystemInfo.Additional.GovPublicApplyIsDeleteAllowed;
                    hlDelete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(PageUrl + "&Delete=True", "IDCollection", "IDCollection", "请选择需要删除的申请!", "此操作将删除所选申请,确定吗?"));
                }
            }
        }