Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        //检查相应权限
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceXitongjiesuan);

        //判断发放期数中是否存在所选期
        int count = ReleaseBLL.IsSuperintendent(Convert.ToInt32(Request.QueryString["qs"]));

        if (count > 0)
        {
            Response.Write("<script>alert('" + GetTran("001204", "发放期数中存在所选期的,请撤销!") + "');window.opener.location='SalaryGrant.aspx';window.close();</script>");
            return;
        }

        //----------------------------------------------

        //-----------------------------------------------

        //RunExe myRun = new RunExe();
        //if (myRun.IsRun(CommonDataBLL.JiesuanProgramFilename))
        DataTable dt = CommonDataBLL.GetJstype();

        if (dt.Rows.Count > 0)
        {
            ViewState["jsType"] = dt.Rows[0]["jstype"].ToString();
            ViewState["jsId"]   = dt.Rows[0]["id"].ToString();

            if (ViewState["jsType"].ToString() == "0")
            {
                this.reCount.Visible    = true;
                this.beginCount.Visible = false;
            }
            else
            {
                this.reCount.Visible    = false;
                this.beginCount.Visible = true;

                messageLabel.Text = GetTran("001205", "点击上面按钮后,请注意提示信息!");
            }
        }
        else
        {
            ViewState["jsType"] = "1";

            this.reCount.Visible    = false;
            this.beginCount.Visible = true;

            messageLabel.Text = GetTran("001205", "点击上面按钮后,请注意提示信息!");
        }


        this.beginCount.Attributes["onclick"] = "bClick(this);";

        if (Request.QueryString["qs"] != null)
        {
            Session["nowqishu"] = Request.QueryString["qs"].Trim();
        }
        else
        {
            this.messageLabel.Text = GetTran("001206", "参数错误!");
            Response.End();
        }
        Translations();
    }