public void SendMail(XObjs.Registration rr) { this.lt_m = (List <XObjs.Office_view>) this.Session["lt_m"]; XObjs.Office_view bb = (from c in this.lt_m select c).FirstOrDefault();; string html_msg = ""; string vname = rr.Firstname; html_msg = "Dear " + vname + "<br/>"; html_msg = html_msg + "This is to notify you that your application " + bb.product_title + " with file no " + bb.reg_no + " and online id " + bb.oai_no + " has been cleared from opposition and Trademark Registration certificate is now ready for collection. <br/>"; html_msg = html_msg + "You are required to pay the stipulated fees on your agent platform and submit the online forms for collection of the Trademark Registration Certificate. <br/> "; html_msg = html_msg + "Kindly contact Customer support for more information. <br/> <br/>"; html_msg = html_msg + "Online Team <br/>"; html_msg = html_msg + "Trademarks, Patents and Designs Registry <br/>"; html_msg = html_msg + "Commercial law department <br/>"; html_msg = html_msg + "FMITI <br/>"; // Email pp = new Email(); // pp.sendMail("PAYX ALERT", "*****@*****.**", "*****@*****.**", "Trademark Application notification", html_msg, ""); sendemail(rr.Email, html_msg); }
protected void btnSearch_Click2(object sender, EventArgs e) { string ss = ""; string ss2 = ""; string succ = ""; foreach (GridViewRow row in gvX.Rows) { CheckBox chkBox = row.FindControl("cbSelect") as CheckBox; if (chkBox.Checked) { Label Id = row.FindControl("lblLogStaff") as Label; ss = Id.Text; Label Id2 = row.FindControl("applicantID") as Label; ss2 = Id2.Text; zues z = new zues(); succ = this.z.a_tm_office(ss, "7", "Not Opposed", "", "", "", "", this.admin); Retriever vv = new Retriever(); XObjs.Registration ts = vv.getRegistrationByID2(ss2); SendMail(ts); } } Response.Redirect("opposition.aspx"); // Response.Write("<script>window.opener.location.href = window.opener.location.href </script>"); }
public void vupdate() { if ((this.Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"] != null) && (this.Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"] != "") ) { vid = Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"]; // g_pwallet = ret.getG_PwalletByValidationID(vid); String spwallet = ret.getCheckStatusDetails(vid); this.c_mark = this.t.getMarkInfoClassByUserID(spwallet); this.c_rep = this.t.getRepClassByUserID(spwallet); this.c_stage = this.t.getStageClassByUserID(spwallet); this.c_app = this.t.getApplicantClassByID(spwallet); if ((c_app.addressID != null) && (c_app.addressID != "") && (c_app.addressID != "0")) { this.c_app_addy = this.t.getAddressClassByID(this.c_app.addressID); } if ((c_rep.addressID != null) && (c_rep.addressID != "") && (c_rep.addressID != "0")) { this.c_rep_addy = this.t.getAddressClassByID(this.c_rep.addressID); } if ((vid != null)) { //g_tm_info = ret.getG_Tm_infoByPwalletID(g_pwallet.xid); //g_app_info = ret.getG_App_infoByPwalletID(g_pwallet.xid); //g_applicant_info = ret.getG_Applicant_infoByPwalletID(g_pwallet.xid); //g_agent_info = ret.getGenAgentByPwalletID(g_pwallet.xid); //g_ass_info = ret.getG_Ass_infoByPwalletID(g_pwallet.xid); //g_cert_info = ret.getG_Cert_infoByPwalletID(g_pwallet.xid); //g_change_info = ret.getG_Change_infoByPwalletID(g_pwallet.xid); //g_merger_info = ret.getG_Merger_infoByPwalletID(g_pwallet.xid); //g_renewal_info = ret.getG_Renewal_infoByPwalletID(g_pwallet.xid); //g_prelim_search_info = ret.getG_Prelim_search_infoByPwalletID(g_pwallet.xid); //g_other_items_info = ret.getG_Other_items_infoByPwalletID(g_pwallet.xid); //this.lt_tm_office = this.z.getG_TmOfficeDetailsByID(g_pwallet.xid); // List<Recordal> vd = ret.getG_PwalletByID2(g_pwallet.xid); zues zz2 = new zues(); Int32 vint = zz2.getMaxId(spwallet); int num = 0; vd = ret.getG_PwalletByID3(vint); foreach (var ddp in vd) { if (ddp.TRANSACTIONID.Contains("-")) { string[] words = ddp.TRANSACTIONID.Split('-'); vp = ret.getAgent(words[0]); } else { vp = ret.getAgent(ddp.TRANSACTIONID); } if (ddp.RECORDAL_TYPE == "Change_Name") { Px = ddp; Px.RECORDAL_TYPE = "FORM 22"; xusr = "******"; xusr2 = "NEW APPLICANT NAME"; xusr3 = ddp.OLD_APPLICANTNAME; xusr4 = ddp.NEW_APPLICANTNAME; gen_nameHis(ddp); } else if (ddp.RECORDAL_TYPE == "Change_Address") { //Px = ddp; //Px.RECORDAL_TYPE = "FORM 22"; //xusr = "******"; //xusr2 = "NEW PRODUCT TITLE"; //xusr3 = ddp.OLD_PRODUCT_TITLE; //xusr4 = ddp.; //gen_nameAddress(ddp); } else if (ddp.RECORDAL_TYPE == "Change_Rectification") { Px = ddp; Px.RECORDAL_TYPE = "FORM 26"; xusr = "******"; xusr2 = "NEW PRODUCT TITLE"; xusr3 = ddp.OLD_PRODUCT_TITLE; xusr4 = ddp.NEW_PRODUCT_TITLE; //if (ddp.LOGO_DESC == "1" || ddp.LOGO_DESC == "3") //{ // dd2.Visible = true; //} // gen_nameAddress(ddp); } else if (ddp.RECORDAL_TYPE == "Change_Assignment") { Px = ddp; List <Recordal_Detail> xp = new List <Recordal_Detail>(); xp = ret.get_RecordalDetail(ddp.Detail_Id); Px.RECORDAL_TYPE = "FORM 16"; xusr = "******"; xusr2 = "NEW APPLICANT NAME"; xusr3 = xp[0].oldApplicantName; xusr4 = xp[0].newApplicantName; xusr5 = "OLD APPLICANT ADDRESS"; xusr6 = "NEW APPLICANT ADDRESS"; xusr7 = xp[0].oldApplicantAddress; xusr8 = xp[0].newApplicantAddress; xusr9 = "OLD APPLICANT NATIONALITY"; xusr10 = "NEW APPLICANT NATIONALITY"; xusr11 = ret.getCountryName(xp[0].OldApplicantNationality); xusr12 = ret.getCountryName(xp[0].newApplicantNationality); //if (ddp.LOGO_DESC == "1" || ddp.LOGO_DESC == "3") //{ // dd2.Visible = true; //} // gen_nameAddress(ddp); } else if (ddp.RECORDAL_TYPE == "Change_Assignment2") { Px = ddp; List <Recordal_Detail> xp = new List <Recordal_Detail>(); xp = ret.get_RecordalDetail(ddp.Detail_Id); Px.RECORDAL_TYPE = "FORM 17"; xusr = "******"; xusr2 = "NEW APPLICANT NAME"; xusr3 = xp[0].oldApplicantName; xusr4 = xp[0].newApplicantName; xusr5 = "OLD APPLICANT ADDRESS"; xusr6 = "NEW APPLICANT ADDRESS"; xusr7 = xp[0].oldApplicantAddress; xusr8 = xp[0].newApplicantAddress; xusr9 = "OLD APPLICANT NATIONALITY"; xusr10 = "NEW APPLICANT NATIONALITY"; xusr11 = ret.getCountryName(xp[0].OldApplicantNationality); xusr12 = ret.getCountryName(xp[0].newApplicantNationality); //if (ddp.LOGO_DESC == "1" || ddp.LOGO_DESC == "3") //{ // dd2.Visible = true; //} // gen_nameAddress(ddp); } else if (ddp.RECORDAL_TYPE == "Change_Renewal") { Px = ddp; List <Recordal_Detail2> xp = new List <Recordal_Detail2>(); xp = ret.get_RecordalDetail2(ddp.Detail_Id); Px.RECORDAL_TYPE = "FORM 12"; xusr = "******"; xusr2 = "RENEWAL TYPE"; xusr3 = xp[0].Renewal_DueDate; xusr4 = xp[0].Renewal_Type; //if (ddp.LOGO_DESC == "1" || ddp.LOGO_DESC == "3") //{ // dd2.Visible = true; //} // gen_nameAddress(ddp); } } //for (int i = 0; i < this.lt_tm_office.Count; i++) //{ // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td align=\"center\" colspan=\"2\">"; // this.xcomments = this.xcomments + "<strong>" + this.lt_tm_office[i].xcomment.ToUpper() + "</strong><br />"; // this.lt_x_admin_details = this.z.getTmAdminDetailsByID(this.lt_tm_office[i].xofficer); // string xcomments = this.xcomments; // this.xcomments = xcomments + "COMMENT BY: <strong>" + this.lt_x_admin_details.xname.ToUpper() + "( " + this.z.getRoleNameByID(this.lt_x_admin_details.xroleID).ToUpper() + " UNIT)</strong><br /> Date: <strong>" + this.lt_tm_office[i].reg_date.ToUpper() + "</strong>"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // if (lt_tm_office[i].xdoc1 != "") // { // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + "View Document 1: <a href=" + lt_tm_office[i].xdoc1 + " target='_blank'>View</a>"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // } // if (lt_tm_office[i].xdoc2 != "") // { // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + "View Document 2: <a href=" + lt_tm_office[i].xdoc2 + " target='_blank'>View</a>"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // } // if (lt_tm_office[i].xdoc3 != "") // { // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + "View Document 3: <a href=" + lt_tm_office[i].xdoc3 + " target='_blank'>View</a>"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // } // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + " "; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // if (this.lt_tm_office[i].admin_status == "3") // { // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + "--- SUPPORTING SEARCH DOCUMENTS ---"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td align=\"right\">"; // this.xcomments = this.xcomments + "Attached Document:"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "<td>"; // //if ((this.swallet.search_str != "") && (this.swallet.search_str != null)) // //{ // // this.xcomments = this.xcomments + "<a href=view_searcho.aspx?x=" + this.pID + " target='_blank'>View</a>"; // //} // //else // //{ // // this.xcomments = this.xcomments + "NONE"; // //} // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + " "; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // } // ////////// // if (this.lt_tm_office[i].admin_status == "33") // { // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + "--- SUPPORTING SEARCH 2 DOCUMENTS ---"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td align=\"right\">"; // this.xcomments = this.xcomments + "Attached Document:"; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "<td>"; // //if ((this.swallet2.search_str != "") && (this.swallet2.search_str != null)) // //{ // // this.xcomments = this.xcomments + "<a href=view_searcho2.aspx?x=" + this.pID + " target='_blank'>View</a>"; // //} // //else // //{ // // this.xcomments = this.xcomments + "NONE"; // //} // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // this.xcomments = this.xcomments + "<tr>"; // this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">"; // this.xcomments = this.xcomments + " "; // this.xcomments = this.xcomments + "</td>"; // this.xcomments = this.xcomments + "</tr>"; // } ////////// //} //if (g_tm_info.logo_pic != "") //{ // tm_img.ImageUrl = "../admin/tm/gf/" + g_tm_info.logo_pic; // if (File.Exists(serverpath + "\\admin\\tm\\gf\\" + g_tm_info.logo_pic)) // { // tm_img.Height = new Unit(120, UnitType.Pixel); // tm_img.Width = new Unit(120, UnitType.Pixel); // try // { // FileStream st = new FileStream(serverpath + "\\admin\\tm\\gf\\" + g_tm_info.logo_pic, FileMode.Open, FileAccess.Read); // System.Drawing.Image new_img = System.Drawing.Image.FromStream(st); // string ht = new_img.Height.ToString(); // string wt = new_img.Width.ToString(); // if ((ht != "") && (wt != "") && (ht != null) && (wt != null)) // { // if (Convert.ToInt32(ht) > Convert.ToInt32(wt)) // { // tm_img.Height = new Unit(320, UnitType.Pixel); // tm_img.Width = new Unit(240, UnitType.Pixel); // } // else // { // tm_img.Height = new Unit(240, UnitType.Pixel); // tm_img.Width = new Unit(320, UnitType.Pixel); // } // } // else // { // // tm_img.Height = new Unit(120, UnitType.Pixel); // // tm_img.Width = new Unit(120, UnitType.Pixel); // tm_img.Visible = false; // } // } // catch (Exception ex) // { // tm_img.Visible = false; // } // } // else // { // // tm_img.Height = new Unit(120, UnitType.Pixel); // // tm_img.Width = new Unit(120, UnitType.Pixel); // tm_img.Visible = false; // } //} //foreach (Classes.XObjs.Fee_list item in fee_list) //{ // if (item.item_code == g_pwallet.log_officer) // { // lbl_type.Text = item.item.ToUpper(); // } //} //ShowSection(g_pwallet.log_officer); } } }
protected void Page_Load(object sender, EventArgs e) { // var session = HttpContext.Current.Session; // Shopping_card2 pp3 = (Shopping_card2)session["Shopping_card2"]; // pp3 = Request.Form["txnRef"]; Retriever pdx = new Retriever(); string pp33 = Request.QueryString["txnRef"]; pdx.addError2("transaction ref = " + pp33); pp3 = Session["TransactionidID"].ToString();; // txnref = pp3; txnref = pp3; product_id = ConfigurationManager.AppSettings["pd_product_id"]; mackey = ConfigurationManager.AppSettings["pd_mackey"]; check_trans_page = ConfigurationManager.AppSettings["pd_get_trans_json_page"]; c_twall = ret.getTwalletByTransID(txnref); c_app = ret.getApplicantByID(c_twall.applicantID); isw_fields = ret.getISWtransactionByTransactionID(txnref.Trim()); pdx.addError2("got here 1"); if (c_twall.xid != null) { lt_fdets = ret.getFee_detailsByTwalletID(c_twall.xid); lt_hwall = ret.getHwalletByTransID(txnref); int num = 1; int num2 = 0; // XObjs.Registration c_reg2 = pp3.dd; vid = c_twall.xmemberID; Registration = ret.getRegistrationBySubagentRegistrationID(vid); foreach (XObjs.Hwallet hwallet in lt_hwall) { XObjs.PaymentReciept item = new XObjs.PaymentReciept(); XObjs.Fee_list _list = new XObjs.Fee_list(); XObjs.Fee_details _details = new XObjs.Fee_details(); _details = ret.getFee_detailsByID(hwallet.fee_detailsID); _list = ret.getFee_listByID(_details.fee_listID); item.sn = num.ToString(); item.item_code = _list.item_code; if (item.item_code == "AA1") { } item.item_desc = _list.xdesc; item.init_amt = string.Format("{0:n}", Convert.ToInt32(_details.init_amt)); item.tech_amt = string.Format("{0:n}", Convert.ToInt32(_details.tech_amt)); item.qty = string.Format("{0:n}", 1); int num3 = Convert.ToInt32(_details.init_amt) + Convert.ToInt32(_details.tech_amt); item.transID = hwallet.transID + "-" + hwallet.fee_detailsID + "-" + hwallet.xid; num2 += num3; total_amt = string.Format("{0:n}", num2 + Math.Round(Convert.ToDouble(isw_fields.isw_conv_fee), 2)); lt_pr.Add(item); num++; } } xstring.AppendLine("Transaction reference= " + txnref + " Payment reference= " + payRef + " Switching Bank Reference number= " + retRef + " card No= " + cardNum + " apprAmt= " + apprAmt); var inputString = product_id.Trim() + txnref.Trim() + mackey.Trim(); string headerValue = hash_value.GetGetSHA512String(inputString); isr = tx.myRedirect(check_trans_page.Trim() + "?productid=" + product_id.Trim() + "&transactionreference=" + txnref.Trim() + "&amount=" + isw_fields.amount.Trim(), "Hash", headerValue.Trim()); xname.Value = isr.ResponseCode; xname2.Value = txnref; xname3.Value = isr.PaymentReference; xname4.Value = c_app.xemail; xname5.Value = isr.ResponseDescription; if (((isr.ResponseCode != "") && (isr.ResponseCode != null)) && (isr.ResponseCode == "00")) { xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: " + isr.Amount + "\r\n CardNumber: " + isr.CardNumber + "\r\n MerchantReference: " + isr.MerchantReference + "\r\n PaymentReference: " + isr.PaymentReference + "\r\n RetrievalReferenceNumber: " + isr.RetrievalReferenceNumber + "\r\n LeadBankCbnCode: " + isr.LeadBankCbnCode + "\r\n TransactionDate: " + isr.TransactionDate + "\r\n ResponseCode: " + isr.ResponseCode + "\r\n ResponseDescription: " + isr.ResponseDescription + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc); var succ = reg.updateInterSwitchRecords(txnref, payRef, retRef, isr.ResponseCode, isr.TransactionDate, isr.MerchantReference, isr.ResponseDescription, isr.PaymentReference); if (isr.ResponseCode == "00" && (isr.PaymentReference != null || isr.PaymentReference != "")) { xpay_status = "1"; } else { xpay_status = "3"; } reg.updateTwalletPaymentStatus(txnref.Trim(), xpay_status.Trim()); if (succ != 0) { Retriever kp = new Retriever(); Registration dd = new Registration(); dd.updateRegistrationSysID2(vid, "Paid"); XObjs.Registration ds = kp.getRegistrationByID(vid); } Retriever kp2 = new Retriever(); XObjs.Registration ds2 = kp2.getRegistrationByID(vid); kp2.sendAlertHtml(ds2, total_amt, isr, isw_fields, c_twall, c_app, lt_pr); } else if (((isr.ResponseCode != "") && (isr.ResponseCode != null)) && (isr.ResponseCode != "00")) { var succ = reg.updateInterSwitchRecords(txnref, payRef, retRef, isr.ResponseCode, isr.TransactionDate, isr.MerchantReference, isr.ResponseDescription, isr.PaymentReference); if (isr.ResponseCode == "00" && (isr.PaymentReference != null || isr.PaymentReference != "")) { xpay_status = "1"; } else { xpay_status = "3"; } reg.updateTwalletPaymentStatus(txnref.Trim(), xpay_status.Trim()); if (succ != 0) { // sendUnsuccAlertHtml(); } Retriever kp2 = new Retriever(); XObjs.Registration ds2 = kp2.getRegistrationByID(vid); kp2.sendUnsuccAlertHtml(ds2, total_amt, isr, isw_fields, c_twall, c_app, lt_pr); } else if ((isr.ResponseCode == "") || (isr.ResponseCode == null)) { string str2 = "None"; string str3 = "None"; xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: None\r\n CardNumber: None\r\n MerchantReference: None\r\n PaymentReference: None\r\n RetrievalReferenceNumber: None\r\n LeadBankCbnCode: None\r\n TransactionDate: None\r\n ResponseCode: " + str2 + "\r\n ResponseDescription: " + str3 + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc); xpay_status = "3"; reg.updateTwalletPaymentStatus(txnref, xpay_status); if (desc == "") { isr.ResponseDescription = "Transaction Pending"; } else { isr.ResponseDescription = desc; } if (resp == "") { isr.ResponseCode = "XXXX"; } else { isr.ResponseCode = resp; } // sendUnsuccAlertHtml(); Retriever kp2 = new Retriever(); XObjs.Registration ds2 = kp2.getRegistrationByID(vid); kp2.sendUnsuccAlertHtml(ds2, total_amt, isr, isw_fields, c_twall, c_app, lt_pr); } }