DisplayTacheMember.aspx.cs
上传用户:jdb8708888
上传日期:2013-05-29
资源大小:19971k
文件大小:5k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

C#

  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Web;
  7. using System.Web.SessionState;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.HtmlControls;
  11. using System.Data.SqlClient;
  12. using UDS.Components;
  13. namespace UDS.SubModule.UnitiveDocument.DocumentFlow
  14. {
  15. /// <summary>
  16. /// DisplayTacheMember 的摘要说明。
  17. /// </summary>
  18. public class DisplayTacheMember : System.Web.UI.Page
  19. {
  20. protected System.Web.UI.WebControls.Label lblTitle;
  21. protected System.Web.UI.WebControls.LinkButton lbReceiver;
  22. protected System.Web.UI.WebControls.LinkButton lbSignIner;
  23. protected System.Web.UI.WebControls.LinkButton lbUnSignIner;
  24. protected System.Web.UI.WebControls.LinkButton lbAllMember;
  25. protected System.Web.UI.WebControls.LinkButton lbPostiler;
  26. private   long DocID;
  27. private   long FlowID;
  28. private   long StepID;
  29. protected System.Web.UI.WebControls.DataGrid dbStaffList;
  30. public int  DisplayType=0;
  31. public int ReturnPage;
  32. private void Page_Load(object sender, System.EventArgs e)
  33. {
  34. // 在此处放置用户代码以初始化页面
  35. DocID = Request.QueryString["DocID"] ==null?0:Int32.Parse(Request.QueryString["DocID"].ToString());
  36. FlowID = Request.QueryString["FlowID"] ==null?0:Int32.Parse(Request.QueryString["FlowID"].ToString());
  37. StepID = Request.QueryString["StepID"] ==null?0:Int32.Parse(Request.QueryString["StepID"].ToString());
  38. DisplayType = Request.QueryString["DisplayType"] ==null?0:Int32.Parse(Request.QueryString["DisplayType"].ToString());
  39. ReturnPage = Request.QueryString["ReturnPage"] ==null?1:Int32.Parse(Request.QueryString["ReturnPage"].ToString());
  40. if(!Page.IsPostBack)
  41. {
  42. BindGrid();
  43. }
  44. }
  45. #region Web Form Designer generated code
  46. override protected void OnInit(EventArgs e)
  47. {
  48. //
  49. // CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
  50. //
  51. InitializeComponent();
  52. base.OnInit(e);
  53. }
  54. /// <summary>
  55. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  56. /// 此方法的内容。
  57. /// </summary>
  58. private void InitializeComponent()
  59. {    
  60. this.lbAllMember.Click += new System.EventHandler(this.lbAllMember_Click);
  61. this.lbReceiver.Click += new System.EventHandler(this.lbReceiver_Click);
  62. this.lbSignIner.Click += new System.EventHandler(this.lbSignIner_Click);
  63. this.lbUnSignIner.Click += new System.EventHandler(this.lbUnSignIner_Click);
  64. this.lbPostiler.Click += new System.EventHandler(this.lbPostiler_Click);
  65. this.Load += new System.EventHandler(this.Page_Load);
  66. }
  67. #endregion
  68. private void BindGrid()
  69. {
  70. UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
  71. if(DocID==0)
  72. {
  73. lbReceiver.Enabled = false;
  74. lbSignIner.Enabled = false;
  75. lbUnSignIner.Enabled = false;
  76. lbPostiler.Enabled = false;
  77. }
  78. DataTable dt;
  79. switch(DisplayType)
  80. {
  81. case 0:
  82. if(DocID>0)
  83. df.GetStaffInStep(DocID,out dt);
  84. else
  85. {
  86. df.GetStaffInStep(FlowID,StepID,out dt);
  87. }
  88. break;
  89. case 1:
  90. df.GetReceiver(DocID,out dt);
  91. break;
  92. case 2:
  93. df.GetSignIner(DocID,out dt);
  94. break;
  95. case 3:
  96. df.GetUnSignIner(DocID,out dt);
  97. break;
  98. case 4:
  99. df.GetPostiler(DocID,out dt);
  100. break;
  101. default:
  102. dt = null;
  103. break;
  104. }
  105. if(dt !=null)
  106. {
  107. dbStaffList.DataSource = dt.DefaultView;
  108. dbStaffList.DataBind();
  109. }
  110. }
  111. public string GetSelectImage(string NormalImg,string SelectedImg,int selected,int position)
  112. {
  113. if(selected==position)
  114. return SelectedImg;
  115. else
  116. return NormalImg;
  117. }
  118. #region 翻页事件
  119. public void DataGrid_PageChanged(object sender,DataGridPageChangedEventArgs e)
  120. {
  121. dbStaffList.CurrentPageIndex = e.NewPageIndex;
  122. BindGrid();
  123. }
  124. #endregion
  125. private void lbAllMember_Click(object sender, System.EventArgs e)
  126. {
  127. if(DocID>0)
  128. Server.Transfer("DisplayTacheMember.aspx?DocID=" + DocID.ToString()+ "&DisplayType=0"  + "&ReturnPage=" + ReturnPage.ToString());
  129. }
  130. private void lbReceiver_Click(object sender, System.EventArgs e)
  131. {
  132. Server.Transfer("DisplayTacheMember.aspx?DocID=" + DocID.ToString() + "&DisplayType=1" + "&ReturnPage=" + ReturnPage.ToString());
  133. }
  134. private void lbSignIner_Click(object sender, System.EventArgs e)
  135. {
  136. Server.Transfer("DisplayTacheMember.aspx?DocID=" + DocID.ToString() + "&DisplayType=2"  + "&ReturnPage=" + ReturnPage.ToString());
  137. }
  138. private void lbUnSignIner_Click(object sender, System.EventArgs e)
  139. {
  140. Server.Transfer("DisplayTacheMember.aspx?DocID=" + DocID.ToString() + "&DisplayType=3"  + "&ReturnPage=" + ReturnPage.ToString());
  141. }
  142. private void lbPostiler_Click(object sender, System.EventArgs e)
  143. {
  144. Server.Transfer("DisplayTacheMember.aspx?DocID=" + DocID.ToString() + "&DisplayType=4"  + "&ReturnPage=" + ReturnPage.ToString());
  145. }
  146. }
  147. }