Exemplo n.º 1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     string str;
     str = Request.QueryString["vdid"];
     int id = Convert.ToInt32(str);
     Hashtable data2 = new Hashtable();
     data2.Add("ticket_id",Session["compid"]);
     data2.Add("desc", txttaskdesc.Text);
     data2.Add("pk", id);
     data2.Add("dbname", "vendor");
     bll helptakt = new bll();
     helptakt.inshelptas(data2);
     Hashtable data4= new Hashtable();
     data4.Add("ticket_id",Session["compid"]);
     data4.Add("ticket_status","Escalate to Help Desk");
     bll comphelp = new bll();
     comphelp.upcomphelp(data4);
 }
Exemplo n.º 2
0
    protected void btnupd_Click(object sender, EventArgs e)
    {
        Hashtable data = new Hashtable();
        string str2;
        str2 = Request.QueryString["Empid"];
        int id2 = Convert.ToInt32(str2);
        if (id2 != 0)
        {
            if (Session["designation"].ToString() == "Shift engg")
            {
                data.Add("emp_technician", id2);
                data.Add("update", "technician");
                cbstatus.SelectedItem.Text = "Escalate to Help Desk";
                Hashtable data2= new Hashtable();
                data2.Add("ticket_id", txtticketid.Text);
                data2.Add("desc","inform teachnician that new task has been assigned to him for '"+txtclientname.Text+"' and task description is '"+txttastdesc.Text +"' ");
                data2.Add("pk",id2);
                data2.Add("dbname", "employee");
                bll helptakt = new bll();
                helptakt.inshelptas(data2);
            }
            else if (Session["designation"].ToString() == "Head")
            {
                data.Add("emp_shift", id2);
                data.Add("update", "shift");
            }
        }
        else
        {
            data.Add("update", "none");
        }

              data.Add("ticket_id", txtticketid.Text);
              data.Add("designation", Session["designation"].ToString());
              data.Add("probtype" , txtprobtype.Text);
              data.Add( "probsubtype",txtprobsubtype.Text);
              data.Add( "docomplain",txtdocomplain.Text);
              data.Add("dorepair" ,txtdorepair.Text);
              data.Add("priority" , txtpriority.Text);
              data.Add( "ticket_status",cbstatus.SelectedValue );
              data.Add("eta" , txteta.Text);
              data.Add( "ata", txtata.Text);
              data.Add("atc" , txtatc.Text);
              data.Add("others" , txtotherdesc.Text);
              data.Add("taskdesc" ,txttastdesc.Text);

              data.Add("labourcost" ,txtlabourcost.Text);
              data.Add( "additionalcost",txtaddcost.Text);
              data.Add( "partscost", txtpartcost.Text);
              data.Add( "total",txttotal.Text);
              data.Add("tax" ,txttax.Text );
              data.Add("grandtotal" , txtgrandtotal.Text);
              data.Add("assetid", txtassetid.Text);

              data.Add("workdonehead" , txtwrkdnehead.Text);
              data.Add( "workdoneshift",txtwrkdneshift.Text);
              data.Add( "workdonetechnician",txtwrkdnetech.Text);
        if(rbnopart.Checked ==true )
        {
              data.Add( "partsrequired", rbnopart .Text );
        }
        else if (rbyespart.Checked == true)
        {
            data.Add("partsrequired", rbyespart.Text);
        }
        else
        {
            data.Add("partsrequired", "");
        }
        data.Add ("partsdesc",txtpartdesc .Text );

        if(rbyespayment .Checked ==true )
        {
            data.Add ("customerpayment",rbyespayment .Text );
        }
        else if (rbnopayment.Checked == true)
        {
            data.Add("customerpayment", rbnopayment.Text);
        }
        else
        {
            data.Add("customerpayment", "");
        }

        bll empcomup = new bll();
        empcomup.updempcomp(data);

        string empid;
        empid = Request.QueryString["Empid"];
        int eid = Convert.ToInt32(empid);
        if (eid != 0)
        {
            bll count = new bll();
            count.empcount(Convert.ToInt32(empid));
        }

        int id = Convert.ToInt32(txtticketid.Text );

        lblupmess.Text = "Successfully Updated";
    }