Exemplo n.º 1
0
        protected void Verify_Click(object sender, EventArgs e)
        {
            this.succ = this.z.a_tm_office(this.c_mark.log_staff, this.admin_status, this.rbValid.SelectedValue, this.comment.Text, "", "", "", this.admin);
            if (comment.Text != "")
            {
                Classes.Email em = new Email();
                //  this.succ = this.z.a_tm_office(this.c_mark.log_staff, this.admin_status, this.rbValid.SelectedValue, this.comment.Text, "", "", "", this.admin);
                //if (this.succ != "0")
                //{
                //    base.Response.Write("<script language=JavaScript>alert('Data updated successfully')</script>");
                //    base.Response.Redirect("./acceptance_kiv.aspx");
                //}
                //else
                //{
                //    base.Response.Write("<script language=JavaScript>alert('Data not verified, Please try again later')</script>");
                //}

                zues.Adminz x_admin = z.getAdminDetails(admin);

                string d_email = ody.DecryptString(x_admin.xemail, file_len, file_string);

                string sub       = "Message from " + z.getRoleNameByID(admin) + " concerning application: " + t.ValidationIDByPwalletID(c_mark.log_staff);
                string send_succ = em.sendMail(z.getRoleNameByID(admin).ToUpper(), c_rep_addy.email1, d_email, sub, this.comment.Text, "");
                if (send_succ == "sent")
                {
                    Int32 update_succ = z.e_PwalletStatus(this.c_mark.log_staff, admin_status, "kiv");
                    if (update_succ > 0)
                    {
                        base.Response.Write("<script language=JavaScript>alert('Message sent successfully')</script>");
                        base.Response.Redirect("./acceptance_kiv.aspx");
                    }
                    else
                    {
                        base.Response.Write("<script language=JavaScript>alert('The form could not be updated, Please check your internet connection or try again later')</script>");
                        base.Response.Redirect("./acceptance_kiv.aspx");
                    }
                }
                else
                {
                    base.Response.Write("<script language=JavaScript>alert('The E-mail could not be sent, Please check your internet connection or try again later')</script>");
                    base.Response.Redirect("./acceptance_kiv.aspx");
                }
            }

            else
            {
                Response.Write("<script language=JavaScript>alert('Please enter a valid message to send!!')</script>");
                Verify.Visible = false; Confirm.Visible = true;
            }
        }