Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceJiesuan); //检查相应权限

        this.addNewQishu.Attributes["onclick"] = "return confirm('" + GetTran("001139", "确认要创建新一期吗?") + "')";
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        Translations();
        if (!IsPostBack)
        {
            int MaxQs = ReleaseBLL.GetMaxExpectNum();
            if (MaxQs <= 10)
            {
                this.TextBox1.Text = "1";//结算起始期
                this.TextBox2.Text = Convert.ToString(MaxQs);
            }
            else
            {
                this.TextBox1.Text = Convert.ToString(MaxQs - 10);
                this.TextBox2.Text = Convert.ToString(MaxQs);
            }
            this.Label1.Text = "(" + GetTran("001140", "当前期数为") + "<font color=red>" + MaxQs.ToString() + "</font>," + GetTran("001141", "请输入") + "1-" + MaxQs.ToString() + GetTran("001142", "范围内的整数") + ")";

            this.showTotalQishuLink1();


            //自动结算是否启用
            if (ReleaseDAL.GetzidongjsQy() == "1")
            {
                readerData();
            }
            else
            {
                TextBox5.Enabled      = false; //结算周期文本框
                DropDownList1.Enabled = false; //时 下拉框
                DropDownList2.Enabled = false;
                DropDownList3.Enabled = false;
                Button3.Enabled       = false;
                jszq.Enabled          = false;
                ClientScript.RegisterStartupScript(GetType(), "", "<script>enabledCK();</script>");
            }
        }
        Translations();

        nowtimeid.Text = DateTime.Now.ToString();
    }