Esempio n. 1
0
    protected void lbyespar_Click(object sender, EventArgs e)
    {
        Hashtable data = new Hashtable();

        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("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("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", "");
        }

        data.Add("ticket_status", cbstatus.SelectedValue);

        bll empcomup = new bll();
        empcomup.updempcomp(data);
        Session["compid"] = txtticketid.Text;
        Response.Redirect("partreplacement.aspx");
    }
Esempio 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";
    }
Esempio n. 3
0
    protected void btnupd_Click(object sender, EventArgs e)
    {
        Hashtable data = new Hashtable();

        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("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("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", "");
        }

        data.Add("assetid", txtassetid.Text);

            data.Add("ticket_status", cbstatus.SelectedValue );

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

        string str4;
        str4 = Request.QueryString["Ticketid"];
        int id = Convert.ToInt32(str4);

        if (cbstatus.SelectedValue.ToString() == "Close")
        {
            Hashtable feedmail = new Hashtable();

            bll fm = new bll();
            feedmail = fm.feedbackmail(id);
            System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();
            mail.From = "*****@*****.**";
            mail.To = feedmail["emailid"].ToString();
            mail.Subject = "Feedback";
            mail.BodyFormat = System.Web.Mail.MailFormat.Html;
            mail.Body = "<html><body><br><br>Dear Client,<br><br>IFLCM would like to invite you to participate in a survey to tell us about your experiences with IFLCM.<br><br> The survey will take about 5 minutes to complete and can be accessed by clicking on the link below.<br><br>" + feedmail["body"].ToString() + " <br><br>Your feedback is very important, as the results of this survey will help us develop and offer better  services to you, and other clients in the future.   <br><br>Thank you in advance for your participation!   <br><br>  Please note: all of your answers are completely anonymous and confidential.<br><br> <br> Sincerely,<br> IFLCM Team </body></html>";
            System.Web.Mail.SmtpMail.SmtpServer = "smtp.gmail.com";
            //System.Web.Mail.SmtpMail.SmtpServer = "smtp.mail.yahoo.com";
            mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
            mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "*****@*****.**");
            mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "cmsiflcm");
            // - smtp.gmail.com use port 465 or 587
            mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
            //mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25");
            mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
            try
            {
                //System.Web.Mail.Send(mail);
                System.Web.Mail.SmtpMail.Send(mail);
                // Response.Write("Mail is Sent..!!");
            }
            catch (Exception ex)
            {
                //return ex.Message;
                //  Response.Write("Error - " + ex.Message);
            }
        }
        lblupmess.Text = "Successfully Updated";
    }