Exemplo n.º 1
0
        protected void Verify_Click(object sender, EventArgs e)
        {
            if (comment.Text != "")
            {
                succ = z.a_g_tm_office(Session["xid"].ToString(), Session["OfficeID"].ToString(), rbValid.SelectedValue, comment.Text, "", "", "", admin);
                if (Convert.ToInt32(succ) > 0)
                {
                    if (rbValid.SelectedValue == "Treated")
                    {
                        Email email = new Email();

                        if (Session["g_agent_info"] != null)
                        {
                            g_agent_info = (XObjs.Gen_Agent_info)Session["g_agent_info"];
                        }
                        if (Session["g_app_info"] != null)
                        {
                            g_app_info = (XObjs.G_App_info)Session["g_app_info"];
                        }
                        if (Session["g_applicant_info"] != null)
                        {
                            g_applicant_info = (XObjs.G_Applicant_info)Session["g_applicant_info"];
                        }
                        if (Session["g_tm_info"] != null)
                        {
                            g_tm_info = (XObjs.G_Tm_info)Session["g_tm_info"];
                        }
                        if (Session["g_ass_info"] != null)
                        {
                            g_ass_info = (XObjs.G_Ass_info)Session["g_ass_info"];
                        }
                        if (Session["g_cert_info"] != null)
                        {
                            g_cert_info = (XObjs.G_Cert_info)Session["g_cert_info"];
                        }
                        if (Session["g_change_info"] != null)
                        {
                            g_change_info = (XObjs.G_Change_info)Session["g_change_info"];
                        }
                        if (Session["g_merger_info"] != null)
                        {
                            g_merger_info = (XObjs.G_Merger_info)Session["g_merger_info"];
                        }
                        if (Session["g_other_items_info"] != null)
                        {
                            g_other_items_info = (XObjs.G_Other_items_info)Session["g_other_items_info"];
                        }
                        if (Session["g_prelim_search_info"] != null)
                        {
                            g_prelim_search_info = (XObjs.G_Prelim_search_info)Session["g_prelim_search_info"];
                        }
                        if (Session["g_renewal_info"] != null)
                        {
                            g_renewal_info = (XObjs.G_Renewal_info)Session["g_renewal_info"];
                        }
                        if (Session["validationID"] != null)
                        {
                            vid = Session["validationID"].ToString();
                        }


                        string user_doc = c_ud.returnDoc(vid, g_pwallet, g_app_info, g_applicant_info, g_tm_info, g_agent_info, g_ass_info, g_cert_info, g_change_info,
                                                         g_merger_info, g_other_items_info, g_prelim_search_info, g_renewal_info, comment.Text.Trim(), z.getTmAdminDetailsByID(pwalletID).xname, code_title, "mail", lt_g_tm_office[lt_g_tm_office.Count - 1].reg_date);
                        Session["user_doc"] = user_doc;

                        //  email.sendMail("CLD Status Response", "*****@*****.**", "*****@*****.**", "CLD: Response for: " + g_tm_info.tm_title, user_doc, "");

                        email.sendMail("CLD Status Response", g_agent_info.email, "*****@*****.**", "CLD: Response for: " + g_tm_info.tm_title, user_doc, "");

                        //  Response.Write(user_doc);
                    }

                    Response.Write("<script type=\"text/javascript\">alert('Data updated successfully')</script>");
                    Response.Redirect("./g_contact.aspx");
                }
                else
                {
                    Response.Write("<script type=\"text/javascript\">alert('Data not updated, Please try again later')</script>");
                }
            }
            else
            {
                Response.Write("<script type=\"text/javascript\">alert('Please enter a comment to proceed!!')</script>");
            }
        }