📄 ywzz_view.aspx.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using com.unicafe.ui;
using com.unicafe.common;
using com.unicafe.security;
using com.ascs.plp.common;
using com.ascs.plp.publics;
namespace PLP.CWZZ.YWZZ
{
/// <summary>
/// YWZZ_VIEW 的摘要说明。
/// </summary>
public class YWZZ_VIEW :com.unicafe.ui.UnicafePage
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.DataGrid DataGrid1;
protected System.Web.UI.HtmlControls.HtmlForm Form1;
protected System.Web.UI.WebControls.DropDownList DropDownList1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
Com.Ascs.Plp.CW.CW_KJQJMgr CW_KJQJMgr = new Com.Ascs.Plp.CW.CW_KJQJMgr();
private void Page_Load(object sender, System.EventArgs e)
{
try
{
// 在此处放置用户代码以初始化页面
this.VerifyPage(); //登录检查
this.VerifyPage("zz_ywzz_mgr");
if (!this.IsPostBack) //判断第一次显示
{
//ViewState["credit"] = credit;
//首次加载时,将判断标志赋值给一个视图状态值保存在客户端
this.Label1.Text=this.CurrentEmployee.EmplName;
ViewState["JGDM"]=this.CurrentJGXX.JGDM;
string[] DQKJ=this.CW_KJQJMgr.GetDQKJQJ(this.CurrentJGXX.JGDM.ToString());
ViewState["KJND"]=DQKJ[1];
ViewState["KJQJBH"]=DQKJ[0];
ViewState["sql"]= string.Format("exec YWZZ '{0}','{1}','{2}','0'",ViewState["KJND"].ToString(),ViewState["KJQJBH"].ToString(),ViewState["JGDM"].ToString()) ;
//处理DataGrid控件(绑定DataGrid控件 -> 检查是否需要定位 -> 给导航文本赋值)
if(CommonService.HandleDataGrid(this, ViewState["sql"].ToString(), DataGrid1, "Data", Label2, Label3, Label4) == false)
this.Response.Redirect("../../publics/Error.aspx?errmsg=在处理数据时发生错误。");
}
else
{
//检查回发的请求操作是否是要进入上页或下页
if(CommonService.PageNavigate(this, DataGrid1, "Data", Label2, Label3, Label4) == false)
this.Response.Redirect("../../publics/Error.aspx?errmsg=在处理数据时发生错误。");
}
}
catch(Exception e1)
{
LogService.Write ("显示业务未转帐时产生异常。");
LogService.Write (e1.Message);
Prompt.PromptError(this,"显示业务未转帐时产生异常。");
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.DropDownList1.SelectedIndexChanged += new System.EventHandler(this.DropDownList1_SelectedIndexChanged);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
try
{
if(this.DropDownList1.SelectedIndex>-1)
ViewState["sql"]= string.Format("exec YWZZ '{0}','{1}','{2}','{3}'",ViewState["KJND"].ToString(),ViewState["KJQJBH"].ToString(),ViewState["JGDM"].ToString(),this.DropDownList1.SelectedItem.Value);
//处理DataGrid控件(绑定DataGrid控件 -> 检查是否需要定位 -> 给导航文本赋值)
if(CommonService.HandleDataGrid(this,ViewState["sql"].ToString(), DataGrid1, "Data", Label2, Label3, Label4) == false)
this.Response.Redirect("../../publics/Error.aspx?errmsg=在处理数据时发生错误。");
}
catch(Exception e1)
{
LogService.Write ("选择单据类型时产生异常。");
LogService.Write (e1.Message);
Prompt.PromptError(this,"选择单据类型时产生异常。");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -