Example #1
0
    protected void SendMailStaffFac()
    {
        string Mesag = "";

        Mesag = Mesag + "<table style='font-family:Verdana;font-size:16px;font-Weight:Bold;'><tr><td>Missed Call Notification Details</td></tr><tr><td><br/></td></tr></table>";

        Mesag = Mesag + "<br/><table style='font-family:Verdana;font-size:12px;'><tr><td>Dear Sir/Madam,</td></tr><tr><td><br/></td></tr></table>";

        Mesag = Mesag + "<br/><table style='font-family:Verdana;font-size:12px;'><tr><td>Kindly be informed that you have missed call notification in your AdminExam Module.</td></tr><tr><td><br/></td></tr></table>";

        Mesag = Mesag + "<br/><table>";
        Mesag = Mesag + "<table border='1' bgcolor='#f0eace' style='font-family:Verdana;font-size:12px;'>";
        Mesag = Mesag + "<tr><td colspan='2' align='center' style='font-size:14px'>Missed Call Notification Details</td></tr>";

        Mesag = Mesag + "<tr><td>Caller Category</td><td>" + ddlCallerCategory.SelectedItem.Text + "</td></tr>";
        Mesag = Mesag + "<tr><td>First Name</td><td>" + ddlTitle.SelectedItem.Text + "." + txtFirstName.Text.ToUpper() + "</td></tr>";
        Mesag = Mesag + "<tr><td>Middle Name</td><td>" + txtMiddleName.Text.ToUpper() + "</td></tr>";
        Mesag = Mesag + "<tr><td>Last Name</td><td>" + txtLastName.Text.ToUpper() + "</td></tr>";
        Mesag = Mesag + "<tr><td>Date</td><td>" + txtCallDate.Text + "</td></tr>";
        Mesag = Mesag + "<tr><td>Message for Whom</td><td>" + ddlForwardedTo.SelectedItem.Text + "</td></tr>";
        Mesag = Mesag + "<tr><td>Remarks</td><td>" + txtRemarks.Text.ToUpper() + "</td></tr></table>";

        Mesag = Mesag + "<br/><br/><table style='font-family:Verdana;font-size:12px;'><tr><td>Thanks & Regards</td></tr>";
        Mesag = Mesag + "<tr><td style='font-family:Verdana;font-size:11px;'>" + Session["Name"].ToString().ToUpper() + "</td></tr></table>";

        String  Str_FromMail = "";
        String  Str_ToMail   = "";
        DataSet ds;

        AttendanceDataAcessLayer AD = new AttendanceDataAcessLayer();

        ds = new DataSet();

        SqlParameter[] param = new SqlParameter[2];
        param[0] = new SqlParameter("@ToId", Convert.ToInt32(ddlForwardedTo.SelectedValue));
        param[1] = new SqlParameter("@FromId", Session["EmpId"].ToString());

        ds = AD.getDataByParam(param, "Sp_ViewMailId");

        if (ds.Tables[0].Rows.Count > 0)
        {
            Str_ToMail   = ds.Tables[0].Rows[0]["ToMail"].ToString().ToLower();
            Str_FromMail = ds.Tables[0].Rows[0]["FromMail"].ToString().ToLower();
        }
        SendEmails.SendEmail2(Str_FromMail, Str_ToMail, "Missed Call Notification Details", Mesag, Str_FromMail);
        //SendEmails.SendEmail2("*****@*****.**", "*****@*****.**", "Missed Call Notification Details", Mesag, "");
    }
Example #2
0
    public void SendEmail()
    {
        //For Email
        string  ToEmail = txtEmailID.Text;
        string  Name    = txtFirstName.Text + ",";
        string  Mesag   = "";
        SMSCAPI obj     = new SMSCAPI();
        string  strPostResponse;

        if (ddlStudentStatus.SelectedValue == "2")
        {
            Mesag = "<table>";
            Mesag = Mesag + "<tr><td>" + "Dear " + ddlTitle.SelectedItem.Text + " " + Name;
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>Greetings from Skyline University College (SUC)! ";
            Mesag = Mesag + "</td></tr><tr><td>";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for calling Skyline University College, we hope that you were able to get all necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor, if you need further information kindly feel free to get in touch with " + txtAttendedBy.Text + ". Looking forward to seeing you at the University";
            Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for calling us. We hope that you were able to get all necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with" + txtAttendedBy.Text + " Looking forward to seeing you at the University.";
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>Visit our website www.skylineuniversity.ac.ae for more info";
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
            //Mesag = Mesag + "</td></tr><tr><td>" + txtAttendedBy.Text;
            Mesag = Mesag + "</td></tr><tr><td>" + "Marketing & Admissions Dept";
            Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
            //Mesag = Mesag + "</td></tr><tr><td>" + "University City of Sharjah, Sharjah";
            //Mesag = Mesag + "</td></tr><tr><td>" + "P.O. Box: 1797, Sharjah, U.A.E";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Tel. : 971-6-5441155, Fax.: 971-6-5441166";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Email: [email protected]";
            Mesag = Mesag + "</td></tr></tr></tbody></table></p><p></p>";
            SendEmails.SendEmail2("*****@*****.**", ToEmail, "Skyline", Mesag, "");
            SendEmails.SendEmail2("*****@*****.**", ToEmail, "Skyline", Mesag, "");
            //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for enquiring about our Programs at SUC. For more information, please visit us between 9:30am and  9:30pm or visit  www.skylineuniversity.ac.ae");
            //strPostResponse = obj.SendSMS("", "", "+971556460999" , "Thank you for enquiring about our Programs at SUC. For more information, please visit us between 9:30am and  9:30pm or visit  www.skylineuniversity.ac.ae");
        }
        if (ddlStudentStatus.SelectedValue == "1")
        {
            string eventname = "";
            Mesag     = "<table>";
            Mesag     = Mesag + "<tr><td>" + "Dear " + ddlTitle.SelectedItem.Text + " " + Name;
            Mesag     = Mesag + "</td></tr><tr><td>";
            Mesag     = Mesag + "</td></tr><tr><td>";
            Mesag     = Mesag + "</td></tr><tr><td>";
            Mesag     = Mesag + "</td></tr> <tr><td>Greetings from Skyline University College (SUC)!";
            Mesag     = Mesag + "</td></tr><tr><td>";
            eventname = ddlExhibition.SelectedItem.Text;
            try
            {
                if ((eventname == "SELECT") || (eventname == "Select"))
                {
                    Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at our campus. We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with" + txtAttendedBy.Text;
                }
                else
                {
                    Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at " + eventname + " . We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with" + txtAttendedBy.Text;
                }
            }
            catch
            {
                Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at our campus. We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with" + txtAttendedBy.Text;
            }
            //Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at our campus. We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with" + txtAttendedBy.Text;
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>Visit our website www.skylineuniversity.ac.ae for more info";
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
            Mesag = Mesag + "</td></tr><tr><td>" + "Marketing & Admissions Dept";
            Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
            //Mesag = Mesag + "</td></tr><tr><td>" + txtAttendedBy.Text;
            //Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
            //Mesag = Mesag + "</td></tr><tr><td>" + "University City of Sharjah, Sharjah";
            //Mesag = Mesag + "</td></tr><tr><td>" + "P.O. Box: 1797, Sharjah, U.A.E";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Tel. : 971-6-5441155, Fax.: 971-6-5441166";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Email: [email protected]";
            Mesag = Mesag + "</td></tr></tr></tbody></table></p><p></p>";
            SendEmails.SendEmail2("*****@*****.**", ToEmail, "Skyline", Mesag, "");
            //SendEmails.SendEmail2("*****@*****.**", ToEmail, "Skyline", Mesag, "");
            try
            {
                if ((eventname == "SELECT") || (eventname == "Select"))
                {
                    //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for visiting us at "+ eventname +". For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
                }
                else
                {
                    //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for enquiring about our Programs at `SUC. For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
                }
            }
            catch
            {
                //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for enquiring about our Programs at `SUC. For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
            }

            //strPostResponse = obj.SendSMS("", "", "+971556460999", "Thank you for enquiring about our Programs at SUC. For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
        }


        if (ddlStudentStatus.SelectedValue == "9")
        {
            string eventname = "";
            Mesag     = "<table>";
            Mesag     = Mesag + "<tr><td>" + "Dear " + ddlTitle.SelectedItem.Text + " " + Name;
            Mesag     = Mesag + "</td></tr><tr><td>";
            Mesag     = Mesag + "</td></tr><tr><td>";
            Mesag     = Mesag + "</td></tr><tr><td>";
            Mesag     = Mesag + "</td></tr> <tr><td>Greetings from Skyline University College (SUC)!";
            Mesag     = Mesag + "</td></tr><tr><td>";
            eventname = ddlExhibition.SelectedItem.Text;
            try
            {
                Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at " + eventname + " . We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with " + txtAttendedBy.Text;
            }
            catch
            {
                Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at our campus. We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with " + txtAttendedBy.Text;
            }
            //Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for visiting us at our campus. We hope that you were able to get all the necessary information on your requirements from " + txtAttendedBy.Text + ", your admission counselor. If you need further information kindly feel free to get in touch with" + txtAttendedBy.Text;
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>Visit our website www.skylineuniversity.ac.ae for more info";
            Mesag = Mesag + "</td></tr><tr><td>";
            Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
            Mesag = Mesag + "</td></tr><tr><td>" + "Marketing & Admissions Dept";
            Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
            //Mesag = Mesag + "</td></tr><tr><td>" + txtAttendedBy.Text;
            //Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
            //Mesag = Mesag + "</td></tr><tr><td>" + "University City of Sharjah, Sharjah";
            //Mesag = Mesag + "</td></tr><tr><td>" + "P.O. Box: 1797, Sharjah, U.A.E";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Tel. : 971-6-5441155, Fax.: 971-6-5441166";
            //Mesag = Mesag + "</td></tr><tr><td>" + "Email: [email protected]";
            Mesag = Mesag + "</td></tr></tr></tbody></table></p><p></p>";
            SendEmails.SendEmail2("*****@*****.**", ToEmail, "Skyline", Mesag, "");
            //SendEmails.SendEmail2("*****@*****.**", ToEmail, "Skyline", Mesag, "");
            try
            {
                //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for visiting us at " + eventname + ". For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
            }
            catch
            {
                //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for enquiring about our Programs at `SUC. For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
            }

            //strPostResponse = obj.SendSMS("", "", "+971556460999", "Thank you for enquiring about our Programs at SUC. For clarifications please contact the advising officer on +97165441155 or visit  www.skylineuniversity.ac.ae.");
        }
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        try
        {
            //pnlForStudent.Visible = true;
            StudentRegistrationDAL s = new StudentRegistrationDAL();
            int submenuid            = 0;

            try
            {
                if (int.Parse(ddlStudentStatus.SelectedValue) == 6)
                {
                    if (int.Parse(DrpNQ.SelectedValue) == 0)
                    {
                        lblMesag.Text      = "Please Select  Not Interested Reason!";
                        lblMesag.ForeColor = System.Drawing.Color.Red;
                        return;
                    }
                    else
                    {
                        submenuid = int.Parse(DrpNQ.SelectedValue);
                    }
                }
                else
                {
                    submenuid = 0;
                }
            }

            catch
            {
                submenuid = 0;
            }


            if (txtRemarks.Text != "")
            {
                try
                {
                    string Result = s.InsertFollowUpExisting(Request.QueryString["Id"].ToString(), DateTime.Parse(txtCallDate.Text), ddlStudentStatus.SelectedValue, ddlForwardedTo1.SelectedValue, txtRemarks.Text, int.Parse(Session["EMPID"].ToString()), submenuid);

                    if (Result == "error")
                    {
                        lblMesag.Text      = "Try again !!!";
                        lblMesag.ForeColor = System.Drawing.Color.Red;
                        return;
                    }


                    try
                    {
                        string MissedCall = Request.QueryString["A"].ToString();
                        if (Request.QueryString["A"] != null)
                        {
                            if (MissedCall == "F")
                            {
                                string Result1 = s.UpdateFollowUpschedule(Request.QueryString["Id"].ToString());
                            }



                            if (MissedCall == "V")
                            {
                                string Result2 = s.UpdateVisitschedule(Request.QueryString["Id"].ToString());
                            }
                        }
                    }
                    catch
                    {
                    }



                    try
                    {
                        s.InsertOtherFollowup(int.Parse(Request.QueryString["Id"].ToString()), chkPaymentMode.Checked, chkProvCerticate.Checked, int.Parse(Session["EmpId"].ToString()));
                        s.InsertFollowupschedule(int.Parse(Request.QueryString["Id"].ToString()), txtFromDate.Text, int.Parse(Session["EmpId"].ToString()));
                    }
                    catch
                    {
                    }

                    try
                    {
                        if (int.Parse(ddlStudentStatus.SelectedValue) == 1)
                        {
                            s.InsertVisitschedule(int.Parse(Request.QueryString["Id"].ToString()), txtVisitDate.Text, int.Parse(Session["EmpId"].ToString()));
                        }
                    }
                    catch
                    {
                    }


                    string confirmValue = Request.Form["confirm_value"];
                    if (confirmValue == "Yes")
                    {
                        if (chkEmail.Checked == true)
                        {
                            string ToEmail = txtEmailID.Text;
                            string Name    = txtFirstName.Text + ",";
                            string Mesag   = "";
                            Mesag = "<table>";
                            Mesag = Mesag + "<tr><td>" + "Dear " + ddlTitle.SelectedItem.Text + " " + Name;
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr> <tr><td> Greetings from Skyline University College (SUC)!";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Thank you for sparing your time for the follow up call made by  " + txtAttendedBy.Text + "your admission counselor from SUC. We hope that all your queries have been answered. We look forward to receiving you at the university for further guidance on your pursuit of higher education.";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>Visit our website www.skylineuniversity.ac.ae for more info";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Marketing & Admissions Dept";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
                            //Mesag = Mesag + "</td></tr><tr><td>" + txtAttendedBy.Text;
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "University City of Sharjah, Sharjah";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "P.O. Box: 1797, Sharjah, U.A.E";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Tel. : 971-6-5441155, Fax.: 971-6-5441166";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Email: [email protected]";
                            Mesag = Mesag + "</td></tr></tr></tbody></table></p><p></p>";

                            SendEmails.SendEmail2("*****@*****.**", ToEmail, "Registration Follow Up", Mesag, "");
                            //SendEmails.SendEmail2("*****@*****.**", ToEmail, "Registration Follow Up", Mesag, "");
                        }


                        if (chkEmail1.Checked == true)
                        {
                            string ToEmail = txtEmailID.Text;
                            string Name    = txtFirstName.Text + ",";
                            string Mesag   = "";
                            Mesag = "<table>";
                            Mesag = Mesag + "<tr><td>" + "Dear " + ddlTitle.SelectedItem.Text + " " + Name;
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr> <tr><td> Greetings from Skyline University College (SUC)!";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>" + "we were unable to reach you and follow up on your admission query. Kindly feel free to contact us for any clarification. Call +97165441155 Thank you";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>Visit our website www.skylineuniversity.ac.ae for more info";
                            Mesag = Mesag + "</td></tr><tr><td>";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Marketing & Admissions Dept";
                            Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Best regards,";
                            //Mesag = Mesag + "</td></tr><tr><td>" + txtAttendedBy.Text;
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Skyline University College";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "University City of Sharjah, Sharjah";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "P.O. Box: 1797, Sharjah, U.A.E";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Tel. : 971-6-5441155, Fax.: 971-6-5441166";
                            //Mesag = Mesag + "</td></tr><tr><td>" + "Email: [email protected]";
                            Mesag = Mesag + "</td></tr></tr></tbody></table></p><p></p>";
                            SendEmails.SendEmail2("*****@*****.**", ToEmail, "Registration Follow Up", Mesag, "");
                        }


                        if (chkSms.Checked == true)
                        {
                            SMSCAPI obj = new SMSCAPI();
                            string  strPostResponse;
                            //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, "Thank you for attending " + txtAttendedBy.Text + "'s call. We are glad to guide you further.  Visit  www.skylineuniversity.ac.ae for more information.");
                            //strPostResponse = obj.SendSMS("", "", "+971556460999", "Thank you for attending " + txtAttendedBy.Text + "'s call. We are glad to guide you further.  Visit  www.skylineuniversity.ac.ae for more information.");
                        }
                        if (chkSms1.Checked == true)
                        {
                            string  Name = txtFirstName.Text + ",";
                            SMSCAPI obj  = new SMSCAPI();
                            string  strPostResponse;
                            //strPostResponse = obj.SendSMS("", "", "+" + txtMobileNo.Text, " We were unable to reach you and follow up on your admission query. Kindly feel free to contact us for any clarification. Call +97165441155 Thank you..Visit  www.skylineuniversity.ac.ae for more information.");
                            //strPostResponse = obj.SendSMS("", "", "+971503530812", "we were unable to reach you and follow up on your admission query. Kindly feel free to contact us for any clarification. Call +97165441155 Thank you.Visit  www.skylineuniversity.ac.ae for more information.");
                        }
                    }
                }

                catch
                {
                }
                lblMesag.Text      = "Sucessfully Updated!!!";
                lblMesag.ForeColor = System.Drawing.Color.Blue;
                //alertmessage.Show("Data Updated Successfully!");
                //Response.Redirect("FollowUpReport.aspx", false);
                FillGridView();
            }
            else
            {
                lblMesag.Text      = "Remarks Required";
                lblMesag.ForeColor = System.Drawing.Color.Red;
                return;
            }
        }
        catch
        {
            //alertmessage.Show("Please Try Again!");
            lblMesag.Text      = "Try Again!";
            lblMesag.ForeColor = System.Drawing.Color.Red;
        }
    }