⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cancelreq.aspx.cs

📁 人事管理系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class web_SubmitOvertime_CancelReq : System.Web.UI.Page
{
    string jbbh = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        pnlMakeSure.Visible =false ;
        string strsql = "select * from 员工加班表 where 员工编号='"+Session["EmployeeID"].ToString ()+"'";
        SqlConnection conn = db.mysqll();
        conn.Open ();
        SqlCommand cmd=new SqlCommand (strsql ,conn);
        SqlDataAdapter da = new SqlDataAdapter(strsql,conn);
        DataSet ds = new DataSet();
        da.Fill(ds,"加班申请编号");
        grdResult .DataSource =ds .Tables ["加班申请编号"];
        grdResult.DataBind();
        conn.Close();

    }
    protected void btnYes_Click(object sender, EventArgs e)
    {
        string strsql1 = "delect 员工加班表 where 加班申请编号 ='"+jbbh +"'";
        SqlConnection conn = db.mysqll();
        conn.Open();
        SqlCommand cmd = new SqlCommand(strsql1, conn);
        cmd.ExecuteNonQuery ();
        conn.Close ();
    
    }
    protected void btnNo_Click(object sender, EventArgs e)
    {
        pnlMakeSure.Visible = false;
    }
    protected void grdResult_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void grdResult_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Detail")
        {
            lblApproverName.Text =e.Item .Cells [9].Text .ToString ();
            lblReason.Text =e.Item .Cells [10].Text .ToString ();
            jbbh = e.Item.Cells[0].Text.ToString();

        }
        if (e.CommandName == "Cancel") { pnlMakeSure.Visible = true; }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -