Beispiel #1
0
        private void ShowUI()
        {
            Model.Xmgl.Xm_sxhbmx m = BLL.Dmgl.GetEntity <Model.Xmgl.Xm_sxhbmx>("Hbbh", Pkid);
            if (String.IsNullOrEmpty(m.Pkid))
            {
                PageContext.RegisterStartupScript(Alert.GetShowInParentReference("页面参数不正确 !", "打开失败", MessageBoxIcon.Error) + ActiveWindow.GetHideReference());
                return;
            }

            Model.Xmgl.V_xm_sxhb_cur sx = BLL.Dmgl.GetEntity <Model.Xmgl.V_xm_sxhb_cur>(Pkid);
            DateTime dt       = new DateTime(1900, 1, 1);
            string   shsj     = sx.Pysj;
            bool     canAudit = !string.IsNullOrEmpty(shsj) && DateTime.TryParse(shsj, out dt) && dt <= DateTime.Now && DateTime.Now <= dt.AddDays(7);

            this.tbrAudit.Hidden = !((sx.Ztdm == (int)TStar.Web.Globals.SystemSetting.Status.Submitted || canAudit) && sx.Lxrbh == TStar.Web.Globals.Account.Pkid);

            this.lblHbnr.Text = m.Hbnr.Replace("\n", "<br/>");
            this.lblFzr.Text  = sx.Xm;
            this.lblYf.Text   = sx.Yf;
            this.lblTjsj.Text = sx.Tjsj;
            this.lblLxr.Text  = sx.Lxrxm;
            bool isWpy = string.IsNullOrEmpty(sx.Pysj);

            this.lblPyzt.Text = isWpy ? "" : ("【" + sx.Ztxsmc + "】");
            this.lblPysj.Text = isWpy ? "" : ("【评阅时间:" + sx.Pysj + "】");
            this.lblShyj.Text = isWpy ? "尚未评阅" : string.Format("<span style='color:#730000'>{0}</span>", m.Pyyj);
        }
Beispiel #2
0
        private void ShowUI()
        {
            Model.Xmgl.Xm_sxhbmx m = BLL.Dmgl.GetEntity <Model.Xmgl.Xm_sxhbmx>("Hbbh", Pkid);
            if (String.IsNullOrEmpty(m.Pkid))
            {
                PageContext.RegisterStartupScript(Alert.GetShowInParentReference("页面参数不正确 !", "打开失败", MessageBoxIcon.Error) + ActiveWindow.GetHideReference());
                return;
            }

            this.hfdPkid.Text = Pkid;
            this.hfdHbbh.Text = m.Hbbh;
            this.lblHbnr.Text = m.Hbnr.Replace("\n", "<br/>");
            Model.Xmgl.V_xm_sxhb_cur sx = BLL.Dmgl.GetEntity <Model.Xmgl.V_xm_sxhb_cur>(Pkid);
            this.lblFzr.Text  = sx.Xm;
            this.lblFzzt.Text = sx.Fzzt;
            this.lblShyj.Text = string.IsNullOrEmpty(sx.Pysj) ? "尚未评阅" : string.Format("【{0}】<span style='color:#730000'>{1}</span>", sx.Ztxsmc, m.Pyyj);
        }
Beispiel #3
0
        private void ShowUI()
        {
            Model.Xmgl.Xm_sxhbmx m = BLL.Dmgl.GetEntity <Model.Xmgl.Xm_sxhbmx>("Hbbh", Pkid);
            if (String.IsNullOrEmpty(m.Pkid))
            {
                PageContext.RegisterStartupScript(Alert.GetShowInParentReference("页面参数不正确 !", "打开失败", MessageBoxIcon.Error) + ActiveWindow.GetHideReference());
                return;
            }

            this.lblHbnr.Text = m.Hbnr.Replace("\n", "<br/>");
            Model.Xmgl.V_xm_sxhb_cur sx = BLL.Dmgl.GetEntity <Model.Xmgl.V_xm_sxhb_cur>(Pkid);
            this.lblFzr.Text  = sx.Xm;
            this.lblYf.Text   = sx.Yf;
            this.lblTjsj.Text = sx.Tjsj;
            bool isWpy = string.IsNullOrEmpty(sx.Pysj);

            this.lblPyzt.Text = isWpy ? "" : ("【" + sx.Ztxsmc + "】");
            this.lblPysj.Text = isWpy ? "" : ("【评阅时间:" + sx.Pysj + "】");
            this.lblShyj.Text = isWpy ? "尚未评阅" : string.Format("<span style='color:#730000'>{0}</span>", m.Pyyj);
        }
Beispiel #4
0
        /// <summary>
        /// 审核
        /// </summary>
        public static void Audit(Model.Xmgl.Xm_sxhbmx mx, string shrbh, string ztdm)
        {
            // 判断评阅意见长度
            if (mx.Pyyj.Length < 20 || mx.Pyyj.Length > 100)
            {
                throw new Exception(string.Format("评阅意见必须 20 ~ 100 个汉字【当前 <span style='color:red'><b>{0}</b></span> 字】 !", mx.Pyyj.Length));
            }

            // 保存Xm_sxhbmx
            string where = string.Format("Hbbh='{0}'", mx.Hbbh);
            UpdateFields <Model.Xmgl.Xm_sxhbmx>("Pyyj", mx.Pyyj, where);

            // 保存Xm_sxhb
            bool   isBack = false;
            string title  = "";
            string czsj   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

            switch (TU.Common.ConvertHelper.EnumParse <TG.SystemSetting.Status>(ztdm))
            {
            case TG.SystemSetting.Status.ToBeModified:
                isBack = true;
                title  = "修改";
                break;

            case TG.SystemSetting.Status.ToBeRewritten:
                isBack = true;
                title  = "重写";
                break;
            }

            Model.Xmgl.V_xm_sxhb_cur hb = isBack ? GetEntity <Model.Xmgl.V_xm_sxhb_cur>(mx.Hbbh) : null;
            where = string.Format("Pkid='{0}'", mx.Hbbh);
            UpdateFields <Model.Xmgl.Xm_sxhb>(new string[] { "Shrbh", "Pysj", "Ztdm" }, new string[] { shrbh, czsj, ztdm }, where);

            // 退回时生成短信提醒记录
            if (isBack)
            {
                Model.Xtgl.Xt_dxfs dx = new Model.Xtgl.Xt_dxfs();
                dx.Dxlb = "02";
                dx.Jsr  = hb.Xm;
                dx.Sjhm = hb.Sjhm.Substring(0, 11);
                dx.Nr   = string.Format("【{0}】,您好!您有思想汇报被退回要求{1},请尽快处理 !", dx.Jsr, title);
                dx.Fssj = dx.Bcsj = czsj;
                dx.Ztdm = "0";

                try
                {
                    WSSmsService.SmsServiceSoapClient WsSms = new WSSmsService.SmsServiceSoapClient();
                    string s = WsSms.SendMsg(dx.Sjhm, dx.Nr);
                    dx.Ztdm = "2";
                }
                catch (Exception err)
                {
                    dx.Ztdm = "1";
                    dx.Sbyy = err.Message;
                }
                finally
                {
                    Insert <Model.Xtgl.Xt_dxfs>(dx);
                }
            }
        }