EmpVisaInf.aspx.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:6k
- 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 qminoa.BLL;
- using qminoa.Common;
- using qminoa.Common.Data;
- namespace qminoa.Webs.MR
- {
- public class EmpMr34 : qminoa.Webs.PageBase
- {
- protected System.Web.UI.WebControls.ImageButton cmdMr3;
- protected System.Web.UI.WebControls.ImageButton cmdMR31;
- protected System.Web.UI.WebControls.ImageButton cmdMr32;
- protected System.Web.UI.WebControls.ImageButton cmdMr33;
- protected System.Web.UI.WebControls.ImageButton cmdMr34;
- protected System.Web.UI.WebControls.ImageButton cmdMr35;
- protected System.Web.UI.WebControls.ImageButton cmdMr36;
- protected System.Web.UI.WebControls.ImageButton cmdExit;
- protected System.Web.UI.WebControls.Label lblErr;
- protected System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
- protected System.Web.UI.WebControls.Label lblEmpID;
- protected System.Web.UI.WebControls.Label lblNext;
- protected System.Web.UI.WebControls.DataGrid dgdData;
- protected int EmpID;
-
- private void Page_Load(object sender, System.EventArgs e)
- {
- this.PageBegin("人员管理",true);
- EmpID = Convert.ToInt16(Request.QueryString["PARAM_EMPID"]);
- lblEmpID.Text = EmpID.ToString();
- if(!Page.IsPostBack)
- {
- DataBind();
- }
- }
- /// <summary>
- ///
- /// </summary>
- public DataTable VisaTB
- {
- get
- {
- DataTable table = (new EmpSystem()).GetEmpVisaTB(EmpID);
- return table;
- }
- }
- #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.cmdMr3.Click += new System.Web.UI.ImageClickEventHandler(this.cmdMr3_Click);
- this.cmdMR31.Click += new System.Web.UI.ImageClickEventHandler(this.cmdMR31_Click);
- this.cmdMr32.Click += new System.Web.UI.ImageClickEventHandler(this.cmdMr32_Click);
- this.cmdMr33.Click += new System.Web.UI.ImageClickEventHandler(this.cmdMr33_Click);
- this.cmdMr35.Click += new System.Web.UI.ImageClickEventHandler(this.cmdMr35_Click);
- this.cmdMr36.Click += new System.Web.UI.ImageClickEventHandler(this.cmdMr36_Click);
- this.dgdData.EditCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgdData_EditCommand);
- this.dgdData.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgdData_DeleteCommand);
- this.dgdData.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.dgdData_ItemDataBound);
- this.cmdExit.Click += new System.Web.UI.ImageClickEventHandler(this.cmdExit_Click);
- this.Load += new System.EventHandler(this.Page_Load);
- }
- #endregion
- private void cmdExit_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpInf.aspx",false);
- }
- private void dgdData_SelectedIndexChanged(object sender, System.EventArgs e)
- {
-
- }
- private void cmdMr3_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpBase.aspx?EmpID="+lblEmpID.Text,false);
- }
- private void cmdMR31_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpPers.aspx?PARAM_EMPID="+Request.QueryString["PARAM_EMPID"].ToString(),false);
- }
- private void cmdMr32_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpWelinf.aspx?PARAM_EMPID="+Request.QueryString["PARAM_EMPID"].ToString(),false);
- }
- private void cmdMr33_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpEdu.aspx?PARAM_EMPID="+Request.QueryString["PARAM_EMPID"].ToString(),false);
- }
- private void dgdData_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
- {
- if(this.EmpRightCode >= 3)
- {
- int index = e.Item.ItemIndex;
- int visaID = Convert.ToInt16(dgdData.DataKeys[index].ToString(),10);
- if((new EmpSystem()).DeleteMrVita(visaID))
- {
- this.WriteOptLog("删除履历"+visaID.ToString()+"信息");
- JScript.Alert("删除操作成功!");
- dgdData.DataBind();
- }
- else
- {
- JScript.Alert("删除操作失败!");
- }
- }
- else
- {
- JScript.Alert("您没有权限进行此操作!");
- }
- }
- private void dgdData_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
- {
- int index = e.NewPageIndex;
- dgdData.CurrentPageIndex = index;
- dgdData.DataBind();
- }
- private void cmdMr35_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpArcInf.aspx?PARAM_EMPID="+Request.QueryString["PARAM_EMPID"].ToString(),false);
- }
- private void cmdMr36_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- Response.Redirect("EmpContInf.aspx?PARAM_EMPID="+Request.QueryString["PARAM_EMPID"].ToString(),false);
- }
- private void dgdData_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
- {
- ListItemType itemType = e.Item.ItemType;
- e.Item.Attributes["onmouseover"] = "javascript:this.style.backgroundColor='#fff7ce';cursor='hand';" ;
- if (itemType == ListItemType.Item )
- {
- e.Item.Attributes["onmouseout"] = "javascript:this.style.backgroundColor='#dedfde';";
- }
- else if( itemType == ListItemType.AlternatingItem)
- {
- e.Item.Attributes["onmouseout"] = "javascript:this.style.backgroundColor='#ffffff';";
- }
- if (e.Item.ItemType == ListItemType.Item ||
- e.Item.ItemType == ListItemType.AlternatingItem)
- {
- ImageButton button = (ImageButton) e.Item.FindControl("Imagebutton2");
- button.Attributes.Add ("onclick",
- "return confirm ("确定要删除此项吗?");");
- }
- }
- private void dgdData_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
- {
-
- }
-
- }
- }