Beispiel #1
0
    protected void btnsearch_Click(object sender, EventArgs e)
    {
        bll clconn = new bll();
        DataTable dt = new DataTable();
        dt = clconn.connection(Session["query"].ToString());
        if (dt != null)
        {
            GridView1.DataSource = dt;
            GridView1.DataBind();

        }
        else
        {
            lblresult.Text = "There is no such complain registered.";

        }
        UpdatePanel2.Visible = false;
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session ["designation"]=="as")
            {
            }

        }
        catch{
            Response .Redirect ("CmsHome1.aspx");
        }
            if (Session["designation"].ToString() == "Head")
            {
                upheadshift.Visible = true;
                Session["query"] = "select ticket_id, taskdesc, client_id,emp_technician,emp_shift,docomplain,probtype,priority,ticket_status from complain where emp_head='" + Session["empid"] + "' AND ticket_status='Escalate to Head'";
                bll clconn = new bll();
                DataTable dt = new DataTable();
                dt = clconn.connection(Session["query"].ToString());
                GridView3.DataSource = dt;
                GridView3.DataBind();
                lbnopart.Visible = true;

            }
            else if (Session["designation"].ToString() == "Shift engg")
            {
                upheadshift.Visible = true;
                Session["query"] = "select ticket_id, taskdesc, client_id,emp_technician,emp_shift,docomplain,probtype,priority,ticket_status from complain where emp_shift='" + Session["empid"] + "' AND ( ticket_status='Parts Received' OR ticket_status='Escalate to shift engineer' OR ticket_status='Submit for client approval' OR ticket_status='Submit to store' OR ticket_status='AMC vendor notified')";
                bll clconn = new bll();
                DataTable dt = new DataTable();
                dt = clconn.connection(Session["query"].ToString());
                GridView3.DataSource = dt;
                GridView3.DataBind();
                rbnopart.Enabled = true;
                rbyespart.Enabled = true;
            }
            else if (Session["designation"].ToString() == "Help desk personnel")
            {
                uphelp.Visible = true;
                if (IsPostBack)
                {
                    //string str1;
                    //str1 = Request.QueryString["ticketid"];
                    //int id2 = Convert.ToInt32(str1);
                }

                bll amcnotification = new bll();
                DataTable dt;
                dt = amcnotification.amcnotification();
                GridView5.DataSource = dt;
                GridView5.DataBind();
                bll amc = new bll();
                amc.notifiedno();
            }
    }
Beispiel #3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (txtcompreg.Text != "")
        {
            string str1 = Session["query"].ToString();
           DateTime date;

            date=Convert.ToDateTime (txtcompreg.Text );

            str1 += "docomplain BETWEEN '" + txtcompreg .Text  + "' AND '"+txtcompreg.Text+" 23:59:59.997' ";
            Session["query"] = str1;

        }
        //GridView1.Visible = true;
        bll clconn = new bll();
        DataTable dt = new DataTable();
        dt=clconn.connection(Session["query"].ToString());

        GridView2.DataSource = dt;
        GridView2.DataBind();
        btnexport.Visible = true;
        btnpdf.Visible = true;
    }