protected void Page_Load(object sender, EventArgs e) { Permissions.ComRedirect(Page, Permissions.redirUrl); //检查相应权限 Response.Cache.SetExpires(DateTime.Now); Permissions.CheckManagePermission(EnumCompanyPermission.FinanceTiaokong); if (!IsPostBack) { int MaxQs = ReleaseBLL.GetMaxExpectNum(); if (MaxQs == 1) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001291", "当前最大期是第一期不能进入调控结算") + "')</script>"); return; } if (MaxQs <= 10) { this.TextBox1.Text = "1"; this.TextBox2.Text = Convert.ToString(MaxQs - 1); } else { this.TextBox1.Text = Convert.ToString(MaxQs - 10); this.TextBox2.Text = Convert.ToString(MaxQs - 1); } this.Label1.Text = "(" + GetTran("001140", "当前期数为") + "<font color=red>" + MaxQs.ToString() + "</font>," + GetTran("001141", "请输入") + "1-" + (MaxQs - 1).ToString() + GetTran("001142", "范围内的整数") + ")"; //this.showTotalQishuLink(Convert.ToInt32(this.TextBox1.Text.Trim()),Convert.ToInt32(this.TextBox2.Text.Trim())); this.showTotalQishuLink1(MaxQs); } Translations(); }
/// <summary> /// 创建新一期 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void addNewQishu_Click(object sender, EventArgs e) { int AudCount = Permissions.GetPermissions(EnumCompanyPermission.FinanceNewQi); if (AudCount != 4202) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000847", "对不起,您没有权限!") + "');</script>"); return; } int temp = ReleaseBLL.GetMaxExpectNum(); try { Application.UnLock(); Application.Lock(); //创建新一期 ReleaseBLL.addNewQishu(temp + 1); RecycleApplication(); Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001143", "新一期创建完成,请重新登录!") + "');top.location.href('index.aspx')</script>"); } catch (Exception eps) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001144", "创建新一期时发生错误,重新创建!") + "')</script>"); } finally { Application.UnLock(); Application["jinzhi"] = "F"; } }
protected void Button1_Click(object sender, EventArgs e) { int StartQishu = 0, EndQishu = 0; try { StartQishu = Convert.ToInt32(this.TextBox1.Text.Trim()); EndQishu = Convert.ToInt32(this.TextBox2.Text.Trim()); } catch { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001145", "请输入数字!") + "')</script>"); return; } if (StartQishu <= 0 || EndQishu <= 0) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001147", "请输入大于零的整数!") + "')</script>"); return; } if (EndQishu > ReleaseBLL.GetMaxExpectNum()) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001150", "不能大于最大期数!") + "')</script>"); return; } if (EndQishu == ReleaseBLL.GetMaxExpectNum()) { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001150", "不能大于最大期数!") + "')</script>"); return; } if (StartQishu <= EndQishu) { showTotalQishuLink(StartQishu, EndQishu); } else { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001152", "请正确检查起止顺序!") + "')</script>"); return; } Translations(); }
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(); }