Exemple #1
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";
    }
Exemple #2
0
    protected void cbstatushelp_SelectedIndexChanged(object sender, EventArgs e)
    {
        string str4;
        str4 = Request.QueryString["Ticketid"];
        int id = Convert.ToInt32(str4);

        Hashtable data = new Hashtable();
        data.Add("ticket_status", cbstatushelp.SelectedValue);
        data.Add("ticket_id", id);
        bll statusup = new bll();
        statusup.upcomphelp(data);

        if (cbstatushelp.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);
            }
        }
    }