Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
     {
         this.adminID = this.Session["pwalletID"].ToString();
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
     if (base.IsPostBack)
     {
         if (this.rblOptions.SelectedValue == "isw")
         {
             if (this.Session["xispf"] != null)
             {
                 this.xispf = (XObjs.InterSwitchPostFields) this.Session["xispf"];
                 if ((this.Session["AgentType"] != null) && (this.Session["AgentType"].ToString() != ""))
                 {
                     this.agentType = this.Session["AgentType"].ToString();
                     if (this.agentType == "Agent")
                     {
                         this.c_reg = (XObjs.Registration) this.Session["c_reg"];
                         this.xispf.cust_id = this.c_reg.Sys_ID;
                         this.xispf.cust_id_desc = "Portal Agent";
                     }
                     else
                     {
                         this.c_sub = (XObjs.Subagent) this.Session["c_sub"];
                         this.xispf.cust_id = this.c_sub.Sys_ID;
                         this.xispf.cust_id_desc = "Portal Sub-Agent";
                     }
                 }
                 this.addIsw_succ = this.reg.addInterSwitchRecords(this.xispf);
                 if (this.addIsw_succ > 0)
                 {
                     this.update_twallxgt_succ = this.reg.updateTwalletXgt(this.xispf.txn_ref, "xpay_isw", this.adminID);
                     if (this.update_twallxgt_succ > 0)
                     {
                         base.Response.Redirect("./payment_detailst.aspx");
                     }
                 }
             }
             else
             {
                 base.Response.Redirect("../../../A/m_payt.aspx");
             }
         }
         else if ((this.rblOptions.SelectedValue == "bank") && (this.Session["xispf"] != null))
         {
             this.xispf = (XObjs.InterSwitchPostFields) this.Session["xispf"];
             this.update_twallxgt_succ = this.reg.updateTwalletXgtBanker(this.xispf.txn_ref, "xpay_bk", this.adminID);
             if (this.update_twallxgt_succ > 0)
             {
                 base.Response.Redirect("../../../A/m_invoice_bank.aspx?tx=" + this.xispf.txn_ref);
             }
         }
     }
 }
Пример #2
0
        protected void gvTm_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "TmDetailsClick")
            {
                GridViewRow namingContainer = (GridViewRow)((ImageButton)e.CommandSource).NamingContainer;
                int rowIndex = namingContainer.RowIndex;
                string transID = e.CommandArgument.ToString();
                Session["transID"] = transID;
                twall = ret.getTwalletByTransID(transID);

                if (twall.xid != null)
                {
                    isw_fields = ret.getISWtransactionByTransactionID(transID);
                    isw_fields.TransactionDate = isw_fields.TransactionDate.Substring(0, 11).Trim();
                    string xgt = twall.xgt;
                    lt_fdets = ret.getFee_detailsByTwalletID(twall.xid);
                    c_app = ret.getApplicantByID(twall.applicantID);
                    Session["c_app"] = c_app;
                    Session["AgentType"] = twall.xmembertype;
                    Session["transID"] = transID;
                    Session["memberID"] = adminID;
                    Session["transDate"] = twall.xreg_date;
                    if (twall.xmembertype == "Agent")
                    {
                        c_reg = ret.getRegistrationByID(twall.xmemberID);
                        fullname = c_reg.Firstname + " " + c_reg.Surname;
                        coy_name = c_reg.CompanyName;
                        cust_id = c_reg.Sys_ID;
                        email = c_reg.Email;
                        mobile = c_reg.PhoneNumber;
                        Session["coy_name"] = coy_name;
                        Session["fullname"] = fullname;
                        Session["email"] = email;
                        Session["mobile"] = mobile;
                        Session["c_addy"] = c_reg.CompanyAddress;
                    }
                    else
                    {
                        c_sub = ret.getSubAgentByID(twall.xmemberID);
                        fullname = c_sub.Firstname + " " + c_sub.Surname;
                        email = c_sub.Email;
                        mobile = c_sub.Telephone;
                        if (c_sub.xid != null)
                        {
                            c_sub_reg = ret.getRegistrationByID(c_sub.RegistrationID);
                            coy_name = c_sub_reg.CompanyName;
                            cust_id = c_sub_reg.Sys_ID + "_" + c_sub.AssignID;
                        }
                    }
                    c_ai.code = cust_id;
                    c_ai.xname = fullname;
                    c_ai.xemail = email;
                    c_ai.xmobile = mobile;

                    Session["c_ai"] = c_ai;

                    if (xgt == "xpay_bk")
                    {
                        Session["payment_type"] = "Bank";
                        c_banker = ret.getBankerByID(ret.getPwalletByID(twall.xbankerID).xmemberID);
                        Session["bank_xname"] = c_banker.xname;
                        Session["bank_bankname"] = c_banker.bankname;
                        Session["bank_xposition"] = c_banker.xposition;
                        Session["bank_street"] = ret.getAddressByID(c_banker.addressID).street;
                        Session["bank_telephone"] = ret.getAddressByID(c_banker.addressID).telephone1;
                        Session["bank_email"] = ret.getAddressByID(c_banker.addressID).email1;
                    }
                    else if (xgt == "xpay_isw")
                    {
                        Session["payment_type"] = "Online (Inter Switch)";
                    }
                    else
                    {
                        Session["payment_type"] = "Online";
                    }
                    show_inv = 1;
                    if (Session["tm_cnt"] != null)
                    {
                        tm_cnt = Convert.ToInt32(Session["tm_cnt"]);
                    }
                    show_details_grid = 1;
                }
            }
        }
Пример #3
0
 protected void btnConfirm_Click(object sender, EventArgs e)
 {
     if (((this.xtrans.Text == "") || (this.xmob.Text == "")) || (this.val.IsValidMobile(this.xmob.Text) > 0))
     {
         if (this.xtrans.Text == "")
         {
             this.xtrans.BorderColor = Color.Red;
         }
         else
         {
             this.xtrans.BorderColor = Color.Green;
         }
         if (this.xmob.Text == "")
         {
             this.xmob.BorderColor = Color.Red;
         }
         else
         {
             this.xmob.BorderColor = Color.Green;
         }
         base.Response.Write("<script language=JavaScript  type='text/javascript'>alert('PLEASE BE SURE TO FILL IN ALL THE ENTRIES MARKED WITH A RED STAR!!'); </script>");
     }
     else if (((this.xtrans.Text != "") && (this.xmob.Text != "")) && (this.val.IsValidMobile(this.xmob.Text) == 0))
     {
         if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != ""))
         {
             this.agentType = this.Session["agentType"].ToString();
         }
         if (this.agentType == "Agent")
         {
             this.c_reg = this.ret.getRegistrationByPhoneNumber(this.xmob.Text);
             this.Session["c_reg"] = this.c_reg;
             this.Session["RegID"] = this.c_reg.xid;
             this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname;
             this.coy_name = this.c_reg.CompanyName;
             this.cust_id = this.c_reg.Sys_ID;
             this.email = this.c_reg.Email;
             this.mobile = this.c_reg.PhoneNumber;
             this.Session["fullname"] = this.fullname;
             this.Session["email"] = this.email;
             this.Session["mobile"] = this.mobile;
             this.Session["c_addy"] = this.c_reg.CompanyAddress;
         }
         else
         {
             if (this.Session["c_sub"] != null)
             {
                 this.c_sub = this.ret.getSubAgentByPhoneNumber(this.xmob.Text);
                 this.Session["c_sub"] = this.c_sub;
                 this.Session["RegID"] = this.c_sub.xid;
                 this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname;
                 this.Session["fullname"] = this.fullname;
                 this.email = this.c_sub.Email;
                 this.Session["email"] = this.email;
                 this.mobile = this.c_sub.Telephone;
                 this.Session["mobile"] = this.mobile;
             }
             if (this.Session["c_sub_reg"] != null)
             {
                 this.c_sub_reg = this.ret.getRegistrationBySubagentRegistrationID(this.c_sub.RegistrationID);
                 this.Session["c_sub_reg"] = this.c_sub_reg;
                 this.coy_name = this.c_sub_reg.CompanyName;
                 this.cust_id = this.c_sub_reg.Sys_ID + "_" + this.c_sub.AssignID;
                 this.Session["fullname"] = this.fullname;
                 this.Session["email"] = this.email;
                 this.Session["mobile"] = this.mobile;
                 this.Session["c_addy"] = this.c_sub_reg.CompanyAddress;
             }
         }
         string xmemberID = "";
         if ((this.Session["RegID"] != null) && (this.Session["RegID"].ToString() != ""))
         {
             xmemberID = this.Session["RegID"].ToString();
         }
         if ((xmemberID != null) && (xmemberID != ""))
         {
             this.lt_twall = this.ret.getValidatedTwalletByMemberID(xmemberID, this.xtrans.Text);
             if (this.lt_twall.Count > 0)
             {
                 this.paid_status_msg = this.lt_twall[0].xpay_status;
                 if (this.paid_status_msg == "1")
                 {
                     this.paid_status_msg = "PAID";
                     this.btnValidate.Visible = false;
                 }
                 else
                 {
                     this.paid_status_msg = "NOT PAID";
                     this.btnValidate.Visible = true;
                 }
                 this.lt_fdets = this.ret.getFee_detailsByTwalletID(this.lt_twall[0].xid);
                 this.Session["transID"] = this.xtrans.Text;
                 this.Session["memberID"] = xmemberID;
                 this.show_inv = 1;
             }
             else
             {
                 this.status_msg = "COULD NOT FIND THE TRANSACTION ON THE SYSTEM!!";
             }
         }
     }
 }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["c_app"] != null)
     {
         this.c_app = (XObjs.Applicant) this.Session["c_app"];
     }
     if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
     {
         this.adminID = this.Session["pwalletID"].ToString();
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
     if (base.Request.QueryString["tx"] == null)
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
     if (base.Request.QueryString["tx"] != null)
     {
         this.transD = base.Request.QueryString["tx"].ToString();
         this.Session["tx"] = this.transD;
     }
     this.lt_twall = this.ret.getTwalletByMemberID(this.adminID, this.transD, this.Session["AgentType"].ToString());
     if (this.lt_twall.Count > 0)
     {
         this.Session["lt_twall"] = this.lt_twall;
         this.lt_fdets = this.ret.getFee_detailsByTwalletID(this.lt_twall[0].xid);
         if (this.lt_fdets.Count > 0)
         {
             this.Session["lt_fdets"] = this.lt_fdets;
         }
         if ((this.Session["AgentType"] != null) && (this.Session["AgentType"].ToString() != ""))
         {
             this.agentType = this.Session["AgentType"].ToString();
             if (this.agentType == "Agent")
             {
                 if (this.Session["c_reg"] != null)
                 {
                     this.c_reg = (XObjs.Registration) this.Session["c_reg"];
                     this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname;
                     this.coy_name = this.c_reg.CompanyName;
                     this.cust_id = this.c_reg.Sys_ID;
                     this.email = this.c_reg.Email;
                     this.mobile = this.c_reg.PhoneNumber;
                     this.Session["fullname"] = this.fullname;
                     this.Session["email"] = this.email;
                     this.Session["mobile"] = this.mobile;
                     this.Session["c_addy"] = this.c_reg.CompanyAddress;
                 }
             }
             else
             {
                 XObjs.Registration registration = new XObjs.Registration();
                 if (this.Session["c_sub"] != null)
                 {
                     this.c_sub = (XObjs.Subagent) this.Session["c_sub"];
                     this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname;
                     this.Session["fullname"] = this.fullname;
                     this.email = this.c_sub.Email;
                     this.Session["email"] = this.email;
                     this.mobile = this.c_sub.Telephone;
                     this.Session["mobile"] = this.mobile;
                 }
                 if (this.Session["c_sub_reg"] != null)
                 {
                     registration = (XObjs.Registration) this.Session["c_sub_reg"];
                     this.coy_name = registration.CompanyName;
                     this.cust_id = registration.Sys_ID + "_" + this.c_sub.AssignID;
                     this.Session["fullname"] = this.fullname;
                     this.Session["email"] = this.email;
                     this.Session["mobile"] = this.mobile;
                     this.Session["c_addy"] = registration.CompanyAddress;
                 }
             }
         }
         else
         {
             base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
         }
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
 }
Пример #5
0
 protected void sendAlert()
 {
     if ((Session["AgentType"] != null) && (Session["AgentType"].ToString() != ""))
     {
         agentType = Session["AgentType"].ToString();
         if (agentType == "Agent")
         {
             if (Session["c_reg"] != null)
             {
                 c_reg = (XObjs.Registration) Session["c_reg"];
             }
             fullname = c_reg.Firstname + " " + c_reg.Surname;
             Session["fullname"] = fullname;
             email = c_reg.Email;
             Session["email"] = email;
             mobile = c_reg.PhoneNumber.ToUpper();
             Session["mobile"] = mobile;
         }
         else
         {
             if (Session["c_sub"] != null)
             {
                 c_sub = (XObjs.Subagent) Session["c_sub"];
             }
             fullname = c_sub.Firstname + " " + c_sub.Surname;
             Session["fullname"] = fullname;
             email = c_sub.Email;
             Session["email"] = email;
             mobile = c_sub.Telephone.ToUpper();
             Session["mobile"] = mobile;
         }
         Email to_email = new Email();
         Messenger messenger = new Messenger();
         string str = string.Format("{0:n}", xtotal_amt);
         string msg = ((("Dear " + fullname + ",<br/>") + "Your transaction has been added successfully!Please see details below:<br/>") + " Transaction ID: " + transID + "<br/>") + "Amount: " + str + ",<br/>Please go to the nearest bank to make payment or complete the payment online.<br/>Regards";
         string s = ((("Dear " + fullname + ",") + "Your transaction has been added successfully!Please see details below:\r\n") + "Transaction ID: " + transID + "\r\n") + "Amount: " + str + ",\r\nPlease go to the nearest bank to make payment  or complete the payment online.\r\nRegards";
         string subject = "XPAY ALERT";
         string from = "*****@*****.**";
         string to = email;
         s = base.Server.UrlEncode(s);
         if (mobile.StartsWith("0"))
         {
             mobile = "234" + mobile.Remove(0, 1);
         }
         to_email.sendMail("XPAY ALERT", to, from, subject, msg, "");
        // string str8 = messenger.send_sms(s, "XPAY ALERT", mobile);
     }
 }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                Session["Sl_init"] = null;
                Session["Sl_tech"] = null;
                Session["SCart"] = null;
                Session["SItems"] = null;
                Session["c_app"] = null;
                Session["onlineid"] = null;
                Session["onlineid2"] = null;
                Session["onlineid3"] = null;
                Session["onlineid4"] = null;
                Session["onlineid5"] = null;
                Session["onlineid6"] = null;
                Session["onlineid7"] = null;
                Session["onlineid8"] = null;
                Session["onlineid9"] = null;
                if (base.Request.Form["xname"] != null)
                {
                 txt_app_name.Text=   base.Request.Form["xname"].ToString();
                }

                 if (base.Request.Form["address"] != null)
                {
                 txt_app_addy.Text=   base.Request.Form["address"].ToString();

                 }

                 if (base.Request.Form["email"] != null)
                 {
                     txt_app_email.Text = base.Request.Form["email"].ToString();

                 }

                 if (base.Request.Form["PhoneNumber"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = true;

                     gvAg3.Visible = false;

                     ppp.Visible = false;

                     Session["c_app"] = null;
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                      XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg2.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                           string key = row.Cells[1].Text;
                       //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                string text = row.Cells[0].Text;
                string str3 = row.Cells[2].Text;
                string str4 = row.Cells[3].Text;
                string str5 = row.Cells[4].Text;
                int amt = Convert.ToInt32(row.Cells[5].Text);

                          double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                        item.xid = text;
                        item.amt = amt;
                        item.qty = chkBox.Text;
                        item.total_amt = num3;
                        item.item_code = key;
                        item.item_desc = str3;
                        item.init_amt = str4;
                        item.tech_amt = str5;
                        if (!lt_cart.Contains(item))
                        {
                            lt_cart.Add(item);
                            Session["SItems"] = st_items;
                        }
                        if (!st_items.ContainsKey(key))
                        {
                            st_items.Add(key, item);
                            Session["SCart"] = lt_cart;
                        }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                     //if (Session["SCart"] != null)
                     //{
                     //    lt_cart = (List<XObjs.Shopping_card>)Session["SCart"];
                     //    if (lt_cart.Count > 0)
                     //    {
                     //        show_inv = 2;
                     //    }
                     //    else
                     //    {
                     //        show_inv = 1;
                     //    }
                     //}
                     //else
                     //{
                     //    show_inv = 1;
                     //}

                 }

                 if (base.Request.Form["PhoneNumber2"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber2"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible =true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;

                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg3.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                     //if (Session["SCart"] != null)
                     //{
                     //    lt_cart = (List<XObjs.Shopping_card>)Session["SCart"];
                     //    if (lt_cart.Count > 0)
                     //    {
                     //        show_inv = 2;
                     //    }
                     //    else
                     //    {
                     //        show_inv = 1;
                     //    }
                     //}
                     //else
                     //{
                     //    show_inv = 1;
                     //}

                 }

                 if (base.Request.Form["PhoneNumber3"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber3"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid2"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;

                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg3.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                     //if (Session["SCart"] != null)
                     //{
                     //    lt_cart = (List<XObjs.Shopping_card>)Session["SCart"];
                     //    if (lt_cart.Count > 0)
                     //    {
                     //        show_inv = 2;
                     //    }
                     //    else
                     //    {
                     //        show_inv = 1;
                     //    }
                     //}
                     //else
                     //{
                     //    show_inv = 1;
                     //}

                 }

                 if (base.Request.Form["PhoneNumber4"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber4"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid3"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;

                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg4.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                     //if (Session["SCart"] != null)
                     //{
                     //    lt_cart = (List<XObjs.Shopping_card>)Session["SCart"];
                     //    if (lt_cart.Count > 0)
                     //    {
                     //        show_inv = 2;
                     //    }
                     //    else
                     //    {
                     //        show_inv = 1;
                     //    }
                     //}
                     //else
                     //{
                     //    show_inv = 1;
                     //}

                 }

                 if (base.Request.Form["PhoneNumber5"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber5"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid4"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg4.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                     //if (Session["SCart"] != null)
                     //{
                     //    lt_cart = (List<XObjs.Shopping_card>)Session["SCart"];
                     //    if (lt_cart.Count > 0)
                     //    {
                     //        show_inv = 2;
                     //    }
                     //    else
                     //    {
                     //        show_inv = 1;
                     //    }
                     //}
                     //else
                     //{
                     //    show_inv = 1;
                     //}

                 }

                 if (base.Request.Form["PhoneNumber6"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber6"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid5"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg4.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                     //if (Session["SCart"] != null)
                     //{
                     //    lt_cart = (List<XObjs.Shopping_card>)Session["SCart"];
                     //    if (lt_cart.Count > 0)
                     //    {
                     //        show_inv = 2;
                     //    }
                     //    else
                     //    {
                     //        show_inv = 1;
                     //    }
                     //}
                     //else
                     //{
                     //    show_inv = 1;
                     //}

                 }

                 if (base.Request.Form["PhoneNumber7"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber7"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = false;
                     gvAg5.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid6"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg5.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                 }

                 if (base.Request.Form["PhoneNumber8"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber8"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = false;
                     gvAg5.Visible = false;
                     gvAg6.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid7"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg6.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                 }
                 if (base.Request.Form["PhoneNumber9"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber9"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = false;
                     gvAg5.Visible = false;
                     gvAg6.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid8"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg6.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                 }

                 if (base.Request.Form["PhoneNumber10"] != null)
                 {
                     txt_app_no.Text = base.Request.Form["PhoneNumber10"].ToString();
                     adminID = base.Request.Form["pwalletID"].ToString();
                     Session["pwalletID"] = adminID;

                     c_reg = ret.getRegistrationByID(adminID);
                     Session["c_reg"] = c_reg;

                     gvTm.Visible = false;

                     gvPt.Visible = false;

                     gvDs.Visible = false;

                     gvAg.Visible = false;

                     gvAg2.Visible = false;
                     gvAg3.Visible = false;
                     gvAg4.Visible = false;
                     gvAg5.Visible = false;
                     gvAg6.Visible = true;

                     ppp.Visible = false;

                     if (base.Request.Form["onlineid"] != null)
                     {
                         Session["onlineid9"] = base.Request.Form["onlineid"].ToString();
                     }

                     Session["c_app"] = null;
                     txt_app_addy.Text = base.Request.Form["address2"].ToString();
                     txt_app_email.Text = base.Request.Form["email2"].ToString();
                     txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                     txt_app_name.Text = base.Request.Form["xname2"].ToString();
                     c_app.address = txt_app_addy.Text;
                     c_app.xemail = txt_app_email.Text;
                     c_app.xmobile = txt_app_no.Text;
                     c_app.xname = txt_app_name.Text;
                     Session["c_app"] = c_app;
                     XObjs.Shopping_card item = new XObjs.Shopping_card();
                     foreach (GridViewRow row in gvAg7.Rows)
                     {
                         TextBox chkBox = row.FindControl("txtAg") as TextBox;

                         chkBox.Text = "1";

                         string key = row.Cells[1].Text;
                         //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                         string text = row.Cells[0].Text;
                         string str3 = row.Cells[2].Text;
                         string str4 = row.Cells[3].Text;
                         string str5 = row.Cells[4].Text;
                         int amt = Convert.ToInt32(row.Cells[5].Text);

                         double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                         item.xid = text;
                         item.amt = amt;
                         item.qty = chkBox.Text;
                         item.total_amt = num3;
                         item.item_code = key;
                         item.item_desc = str3;
                         item.init_amt = str4;
                         item.tech_amt = str5;
                         if (!lt_cart.Contains(item))
                         {
                             lt_cart.Add(item);
                             Session["SItems"] = st_items;
                         }
                         if (!st_items.ContainsKey(key))
                         {
                             st_items.Add(key, item);
                             Session["SCart"] = lt_cart;
                         }

                     }
                     Session["AgentType"] = "Agent";
                     fillAmtList();
                     AddFeeList();

                 }

                if (base.Request.Form["PhoneNumber11"] != null)
                {
                    txt_app_no.Text = base.Request.Form["PhoneNumber11"].ToString();
                    adminID = base.Request.Form["pwalletID"].ToString();
                    Session["pwalletID"] = adminID;

                    c_reg = ret.getRegistrationByID(adminID);
                    Session["c_reg"] = c_reg;

                    gvTm.Visible = false;

                    gvPt.Visible = false;

                    gvDs.Visible = false;

                    gvAg.Visible = false;

                    gvAg2.Visible = false;
                    gvAg3.Visible = false;
                    gvAg4.Visible = false;
                    gvAg5.Visible = false;
                    gvAg6.Visible = false;
                    gvAg7.Visible = false;
                    gvAg8.Visible = true;
                    ppp.Visible = false;

                    if (base.Request.Form["onlineid"] != null)
                    {
                        Session["onlineid10"] = base.Request.Form["onlineid"].ToString();
                    }

                    Session["c_app"] = null;
                    txt_app_addy.Text = base.Request.Form["address2"].ToString();
                    txt_app_email.Text = base.Request.Form["email2"].ToString();
                    txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                    txt_app_name.Text = base.Request.Form["xname2"].ToString();
                    c_app.address = txt_app_addy.Text;
                    c_app.xemail = txt_app_email.Text;
                    c_app.xmobile = txt_app_no.Text;
                    c_app.xname = txt_app_name.Text;
                    Session["c_app"] = c_app;
                    XObjs.Shopping_card item = new XObjs.Shopping_card();
                    foreach (GridViewRow row in gvAg8.Rows)
                    {
                        TextBox chkBox = row.FindControl("txtAg") as TextBox;

                        chkBox.Text = "1";

                        string key = row.Cells[1].Text;
                        //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                        string text = row.Cells[0].Text;
                        string str3 = row.Cells[2].Text;
                        string str4 = row.Cells[3].Text;
                        string str5 = row.Cells[4].Text;
                        int amt = Convert.ToInt32(row.Cells[5].Text);

                        double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                        item.xid = text;
                        item.amt = amt;
                        item.qty = chkBox.Text;
                        item.total_amt = num3;
                        item.item_code = key;
                        item.item_desc = str3;
                        item.init_amt = str4;
                        item.tech_amt = str5;
                        if (!lt_cart.Contains(item))
                        {
                            lt_cart.Add(item);
                            Session["SItems"] = st_items;
                        }
                        if (!st_items.ContainsKey(key))
                        {
                            st_items.Add(key, item);
                            Session["SCart"] = lt_cart;
                        }

                    }
                    Session["AgentType"] = "Agent";
                    fillAmtList();
                    AddFeeList();

                }

                if (base.Request.Form["PhoneNumber12"] != null)
                {
                    txt_app_no.Text = base.Request.Form["PhoneNumber12"].ToString();
                    adminID = base.Request.Form["pwalletID"].ToString();
                    Session["pwalletID"] = adminID;

                    c_reg = ret.getRegistrationByID(adminID);
                    Session["c_reg"] = c_reg;

                    gvTm.Visible = false;

                    gvPt.Visible = false;

                    gvDs.Visible = false;

                    gvAg.Visible = false;

                    gvAg2.Visible = false;
                    gvAg3.Visible = false;
                    gvAg4.Visible = false;
                    gvAg5.Visible = false;
                    gvAg6.Visible = false;
                    gvAg9.Visible = true;

                    ppp.Visible = false;

                    if (base.Request.Form["onlineid"] != null)
                    {
                        Session["onlineid12"] = base.Request.Form["onlineid"].ToString();
                    }

                    Session["c_app"] = null;
                    txt_app_addy.Text = base.Request.Form["address2"].ToString();
                    txt_app_email.Text = base.Request.Form["email2"].ToString();
                    txt_app_no.Text = base.Request.Form["PhoneNumber77"].ToString();
                    txt_app_name.Text = base.Request.Form["xname2"].ToString();
                    c_app.address = txt_app_addy.Text;
                    c_app.xemail = txt_app_email.Text;
                    c_app.xmobile = txt_app_no.Text;
                    c_app.xname = txt_app_name.Text;
                    Session["c_app"] = c_app;
                    XObjs.Shopping_card item = new XObjs.Shopping_card();
                    foreach (GridViewRow row in gvAg9.Rows)
                    {
                        TextBox chkBox = row.FindControl("txtAg") as TextBox;

                        chkBox.Text = "1";

                        string key = row.Cells[1].Text;
                        //  string key = gvAg2.DataKeys[row.RowIndex].Value.ToString();

                        string text = row.Cells[0].Text;
                        string str3 = row.Cells[2].Text;
                        string str4 = row.Cells[3].Text;
                        string str5 = row.Cells[4].Text;
                        int amt = Convert.ToInt32(row.Cells[5].Text);

                        double num3 = calcTotalAmt(Convert.ToInt32(chkBox.Text), amt);
                        item.xid = text;
                        item.amt = amt;
                        item.qty = chkBox.Text;
                        item.total_amt = num3;
                        item.item_code = key;
                        item.item_desc = str3;
                        item.init_amt = str4;
                        item.tech_amt = str5;
                        if (!lt_cart.Contains(item))
                        {
                            lt_cart.Add(item);
                            Session["SItems"] = st_items;
                        }
                        if (!st_items.ContainsKey(key))
                        {
                            st_items.Add(key, item);
                            Session["SCart"] = lt_cart;
                        }

                    }
                    Session["AgentType"] = "Agent";
                    fillAmtList();
                    AddFeeList();

                }

                fillAmtList();
                if ((((base.Request.Form["agentType"] != null) && (base.Request.Form["agentType"].ToString() != "")) && (base.Request.Form["pwalletID"] != null)) && (base.Request.Form["pwalletID"].ToString() != ""))
                {

                    adminID = base.Request.Form["pwalletID"].ToString();
                    Session["pwalletID"] = adminID;
                    agentType = base.Request.Form["agentType"].ToString();
                    Session["agentType"] = agentType;
                    if (agentType == "Agent")
                    {
                        c_reg = ret.getRegistrationByID(adminID);
                        Session["c_reg"] = c_reg;
                    }
                    else
                    {
                        c_sub = ret.getSubAgentByID(adminID);
                        Session["c_sub"] = c_sub;
                        c_sub_reg = ret.getRegistrationBySubagentRegistrationID(c_sub.RegistrationID);
                        Session["c_sub_reg"] = c_sub_reg;
                    }
                }
                else
                {
                    base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
                }
            }
            else if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != ""))
            {
                adminID = Session["pwalletID"].ToString();
            }
            else
            {
                base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
            }
        }
Пример #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["c_app"] != null)
     {
         c_app = (XObjs.Applicant) Session["c_app"];
     }
     if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != ""))
     {
         adminID = Session["pwalletID"].ToString();
     }
     else
     {
         base.Response.Redirect("../a_login.aspx");
     }
     if (base.Request.QueryString["tx"] == null)
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
     if (base.Request.QueryString["tx"] != null)
     {
         transD = base.Request.QueryString["tx"].ToString();
         Session["tx"] = transD;
     }
     lt_twall = ret.getTwalletByMemberID(adminID, transD, Session["AgentType"].ToString());
     if (lt_twall.Count > 0)
     {
         Session["lt_twall"] = lt_twall;
         lt_fdets = ret.getFee_detailsByTwalletID(lt_twall[0].xid);
         if (lt_fdets.Count > 0)
         {
             Session["lt_fdets"] = lt_fdets;
         }
         if ((Session["AgentType"] != null) && (Session["AgentType"].ToString() != ""))
         {
             agentType = Session["AgentType"].ToString();
             if (agentType == "Agent")
             {
                 if (Session["c_reg"] != null)
                 {
                     c_reg = (XObjs.Registration) Session["c_reg"];
                     fullname = c_reg.Firstname + " " + c_reg.Surname;
                     coy_name = c_reg.CompanyName;
                     cust_id = c_reg.Sys_ID;
                     email = c_reg.Email;
                     mobile = c_reg.PhoneNumber;
                     Session["fullname"] = fullname;
                     Session["email"] = email;
                     Session["mobile"] = mobile;
                     Session["c_addy"] = c_reg.CompanyAddress;
                 }
             }
             else
             {
                 XObjs.Registration registration = new XObjs.Registration();
                 if (Session["c_sub"] != null)
                 {
                     c_sub = (XObjs.Subagent) Session["c_sub"];
                     fullname = c_sub.Firstname + " " + c_sub.Surname;
                     Session["fullname"] = fullname;
                     email = c_sub.Email;
                     Session["email"] = email;
                     mobile = c_sub.Telephone;
                     Session["mobile"] = mobile;
                 }
                 if (Session["c_sub_reg"] != null)
                 {
                     registration = (XObjs.Registration) Session["c_sub_reg"];
                     coy_name = registration.CompanyName;
                     cust_id = registration.Sys_ID + "_" + c_sub.AssignID;
                     Session["fullname"] = fullname;
                     Session["email"] = email;
                     Session["mobile"] = mobile;
                     Session["c_addy"] = registration.CompanyAddress;
                 }
             }
         }
         else
         {
             base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
         }
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
 }
Пример #8
0
        protected void AddFeeList()
        {
            if (Session["c_app"] != null)
            {
                c_app = (XObjs.Applicant) Session["c_app"];
            }
            int num = reg.addApplicant(c_app);
            if ((num > 0) && ((Session["AgentType"] != null) && (Session["AgentType"].ToString() != "")))
            {
                agentType = Session["AgentType"].ToString();
                if (agentType == "agent")
                {
                    agentType = "Agent";
                    Session["AgentType"] = agentType;
                }
                if (agentType == "Agent")
                {
                    if (Session["c_reg"] != null)
                    {
                        c_reg = (XObjs.Registration) Session["c_reg"];
                    }

                    fullname = c_reg.Firstname + " " + c_reg.Surname;
                    Session["fullname"] = fullname;
                    email = c_reg.Email;
                    Session["email"] = email;
                    mobile = c_reg.PhoneNumber;
                    Session["mobile"] = mobile;
                }
                else
                {
                    if (Session["c_sub"] != null)
                    {
                        c_sub = (XObjs.Subagent) Session["c_sub"];
                    }
                    fullname = c_sub.Firstname + " " + c_sub.Surname;
                    Session["fullname"] = fullname;
                    email = c_sub.Email;
                    Session["email"] = email;
                    mobile = c_sub.Telephone;
                    Session["mobile"] = mobile;
                }
                scard = ret.getRandomScard();
                string vtransid = Generate15UniqueDigits(); ;
              //  lt_twall = ret.getTwalletByMemberID(adminID, scard.xnum, Session["AgentType"].ToString());
                lt_twall = ret.getTwalletByMemberID(adminID, vtransid, Session["AgentType"].ToString());
                if (lt_twall.Count == 0)
                {

                   // transID = scard.xnum.ToUpper();
                    transID = vtransid;
                    int num2 = 0;
                    int num3 = 0;
                   // twall.ref_no = "X" + adminID + "-" + DateTime.Now.ToString("yyyy") + "-" + scard.xnum;

                    twall.ref_no = "X" + adminID + "-" + DateTime.Now.ToString("yyyy") + "-" + transID;
                    ref_no = twall.ref_no;
                 //   twall.transID = scard.xnum;
                    twall.transID = transID;
                    twall.xbankerID = "0";
                    twall.xgt = "xpay";
                    twall.xmemberID = adminID;
                    twall.xmembertype = Session["AgentType"].ToString();
                    twall.xpay_status = "2";
                    twall.applicantID = num.ToString();
                    twall.xreg_date = xreg_date;
                    twall.xsync = "0";
                    twall.xvisible = "1";
                    num2 = reg.addTwallet(twall);
                    if (num2 > 0)
                    {
                        if (Session["SCart"] != null)
                        {
                            lt_cart = (List<XObjs.Shopping_card>) Session["SCart"];
                        }
                        if (Session["Sl_init"] != null)
                        {
                            sl_init_amt = (SortedList<string, string>) Session["Sl_init"];
                        }
                        if (Session["Sl_tech"] != null)
                        {
                            sl_tech_amt = (SortedList<string, string>) Session["Sl_tech"];
                        }
                        int num4 = 0;
                        foreach (XObjs.Shopping_card _card in lt_cart)
                        {
                            f_dets.twalletID = num2.ToString();
                            f_dets.fee_listID = _card.xid;
                            f_dets.xlogstaff = adminID;
                            f_dets.xqty = _card.qty;
                            f_dets.xused = "0";
                            f_dets.tot_amt = _card.total_amt.ToString();
                            xtotal_amt += Convert.ToInt32(_card.total_amt);
                            f_dets.init_amt = sl_init_amt[_card.xid];
                            f_dets.tech_amt = sl_tech_amt[_card.xid];
                            f_dets.xreg_date = xreg_date;
                            f_dets.xsync = "0";
                            f_dets.xvisible = "1";
                            num3 = reg.addFee_details(f_dets);
                            num4++;
                            for (int i = 0; i < Convert.ToInt32(_card.qty); i++)
                            {
                                int num6 = 0;
                                c_hwall.transID = transID;// scard.xnum;
                                c_hwall.used_status = "Not Used";
                                c_hwall.product_title = "";
                                c_hwall.xreg_date = xreg_date;
                                c_hwall.used_date = "";
                                c_hwall.fee_detailsID = num3.ToString();
                                num6 = reg.addHwallet(c_hwall);
                            }
                        }
                        if (num4 == lt_cart.Count<XObjs.Shopping_card>())
                        {
                           // base.Response.Redirect("./m_invoicex.aspx?mx=" + adminID + "&tx=" + scard.xnum);

                            base.Response.Redirect("./m_invoicex.aspx?mx=" + adminID + "&tx=" + transID);
                        }
                    }
                }
                else
                {
                    AddFeeList();
                }
            }
        }
Пример #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != ""))
            {
               adminID =Session["pwalletID"].ToString();
            }
            else
            {
                base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
            }
            if (base.IsPostBack)
            {
                if (rblOptions.SelectedValue == "isw")
                {
                    if (Session["xispf"] != null)
                    {
                       xispf = (XObjs.InterSwitchPostFields)Session["xispf"];
                        if ((Session["AgentType"] != null) && (Session["AgentType"].ToString() != ""))
                        {
                           agentType =Session["AgentType"].ToString();
                            if (agentType == "Agent")
                            {
                               c_reg = (XObjs.Registration)Session["c_reg"];
                               xispf.cust_id =c_reg.Sys_ID;
                               Session["cust_id"] =c_reg.Sys_ID;
                               xispf.cust_id_desc = "Portal Agent";
                            }
                            else
                            {
                               c_sub = (XObjs.Subagent)Session["c_sub"];
                               xispf.cust_id =c_sub.Sys_ID;
                               Session["cust_id"] =c_sub.Sys_ID;
                               xispf.cust_id_desc = "Portal Sub-Agent";
                            }
                        }
                        int tw_cnt = 0; Retriever ret = new Retriever();
                        tw_cnt = ret.getTransIDCnt(xispf.txn_ref.Trim());
                       // if(tw_cnt==0)
                      //  {
                        Retriever dd = new Retriever();
                        int vcount3 = dd.getCountTrans(xispf.txn_ref.Trim());
                        if (vcount3 > 0)
                        {

                            return;
                        }
                       addIsw_succ =reg.addInterSwitchRecords(xispf);
                        if (addIsw_succ > 0)
                        {
                           update_twallxgt_succ =reg.updateTwalletXgt(xispf.txn_ref, "xpay_isw",adminID);
                            if (update_twallxgt_succ > 0)
                            {
                                base.Response.Redirect("./payment_detailsx.aspx");
                            }
                        }
                      //  }
                    }
                    else
                    {
                        base.Response.Redirect("../../../A/m_payx.aspx");
                    }
                }
                else if ((rblOptions.SelectedValue == "bank") && (Session["xispf"] != null))
                {
                   xispf = (XObjs.InterSwitchPostFields)Session["xispf"];
                   update_twallxgt_succ =reg.updateTwalletXgtBanker(xispf.txn_ref, "xpay_bk",adminID);
                    if (update_twallxgt_succ > 0)
                    {
                        base.Response.Redirect("../../../A/m_invoice_bank.aspx?tx=" +xispf.txn_ref);
                    }
                }
            }
        }
Пример #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["c_app"] != null)
     {
         this.c_app = (XObjs.Applicant) this.Session["c_app"];
     }
     if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
     {
         this.adminID = this.Session["pwalletID"].ToString();
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
     if (this.Session["xispf"] != null)
     {
         this.xispf = (XObjs.InterSwitchPostFields) this.Session["xispf"];
     }
     if ((this.Session["AgentType"] != null) && (this.Session["AgentType"].ToString() != ""))
     {
         this.agentType = this.Session["AgentType"].ToString();
         if (this.agentType == "Agent")
         {
             if (this.Session["c_reg"] != null)
             {
                 this.c_reg = (XObjs.Registration) this.Session["c_reg"];
                 this.Session["name"] = this.c_reg.Firstname + " " + this.c_reg.Surname;
                 this.Session["coy_name"] = this.c_reg.CompanyName;
                 this.Session["Address"] = this.c_reg.CompanyAddress;
             }
         }
         else
         {
             XObjs.Registration registration = new XObjs.Registration();
             if (this.Session["c_sub"] != null)
             {
                 this.c_sub = (XObjs.Subagent) this.Session["c_sub"];
                 this.Session["name"] = this.c_sub.Firstname + " " + this.c_sub.Surname;
             }
             if (this.Session["c_sub_reg"] != null)
             {
                 registration = (XObjs.Registration) this.Session["c_sub_reg"];
                 this.Session["coy_name"] = registration.CompanyName;
                 this.Session["Address"] = registration.CompanyAddress;
             }
         }
     }
     this.twall = this.ret.getTwalletByMemberID(this.adminID, this.xispf.txn_ref, this.agentType);
     this.lt_fdets = this.ret.getFee_detailsByTwalletID(this.twall[0].xid);
     int num = 0;
     int num2 = 0;
     if (this.lt_fdets.Count > 0)
     {
         foreach (XObjs.Fee_details _details in this.lt_fdets)
         {
             num += (Convert.ToInt32(_details.init_amt) * Convert.ToInt32(_details.xqty)) * 100;
             num2 += (Convert.ToInt32(_details.tech_amt) * Convert.ToInt32(_details.xqty)) * 100;
         }
     }
     this.refno = this.xispf.txn_ref;
     this.isw_conv_fee = Math.Round(Convert.ToDecimal(this.xispf.isw_conv_fee), 2).ToString();
     this.total_amt = Convert.ToString(this.xispf.amount);
     this.amt = Convert.ToString((decimal) ((Convert.ToDecimal(this.total_amt) / 100M) - Convert.ToDecimal(this.isw_conv_fee)));
     this.name = this.Session["name"].ToString();
     this.coy_name = this.Session["coy_name"].ToString();
     this.addy = this.Session["Address"].ToString();
     this.amt = string.Format("{0:n}", this.amt);
     this.isw_conv_fee = string.Format("{0:n}", this.isw_conv_fee);
     this.Session["amt"] = this.amt;
     this.Session["isw_conv_fee"] = this.isw_conv_fee;
     this.Session["total_amt"] = this.total_amt;
     this.Session["Refno"] = this.refno;
     this.Session["einao_split_amt"] = num2.ToString();
     this.Session["cld_split_amt"] = num.ToString();
     this.Session["hashString"] = this.xispf.hash;
     if (this.addy.Contains<char>(','))
     {
         this.addy = this.addy.Replace(",", ", ");
     }
 }
Пример #11
0
 protected void AddFeeList()
 {
     if (this.Session["c_app"] != null)
     {
         this.c_app = (XObjs.Applicant) this.Session["c_app"];
     }
     int num = this.reg.addApplicant(this.c_app);
     if ((num > 0) && ((this.Session["AgentType"] != null) && (this.Session["AgentType"].ToString() != "")))
     {
         this.agentType = this.Session["AgentType"].ToString();
         if (this.agentType == "Agent")
         {
             if (this.Session["c_reg"] != null)
             {
                 this.c_reg = (XObjs.Registration) this.Session["c_reg"];
             }
             this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname;
             this.Session["fullname"] = this.fullname;
             this.email = this.c_reg.Email;
             this.Session["email"] = this.email;
             this.mobile = this.c_reg.PhoneNumber;
             this.Session["mobile"] = this.mobile;
         }
         else
         {
             if (this.Session["c_sub"] != null)
             {
                 this.c_sub = (XObjs.Subagent) this.Session["c_sub"];
             }
             this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname;
             this.Session["fullname"] = this.fullname;
             this.email = this.c_sub.Email;
             this.Session["email"] = this.email;
             this.mobile = this.c_sub.Telephone;
             this.Session["mobile"] = this.mobile;
         }
         this.scard = this.ret.getRandomScard();
         this.lt_twall = this.ret.getTwalletByMemberID(this.adminID, this.scard.xnum, this.Session["AgentType"].ToString());
         if (this.lt_twall.Count == 0)
         {
             this.transID = this.scard.xnum.ToUpper();
             int num2 = 0;
             int num3 = 0;
             this.twall.ref_no = "X" + this.adminID + "-" + DateTime.Now.ToString("yyyy") + "-" + this.scard.xnum;
             this.ref_no = this.twall.ref_no;
             this.twall.transID = this.scard.xnum;
             this.twall.xbankerID = "0";
             this.twall.xgt = "xpay";
             this.twall.xmemberID = this.adminID;
             this.twall.xmembertype = this.Session["AgentType"].ToString();
             this.twall.xpay_status = "2";
             this.twall.applicantID = num.ToString();
             this.twall.xreg_date = this.xreg_date;
             this.twall.xsync = "0";
             this.twall.xvisible = "1";
             num2 = this.reg.addTwallet(this.twall);
             if (num2 > 0)
             {
                 if (this.Session["SCart"] != null)
                 {
                     this.lt_cart = (List<XObjs.Shopping_card>) this.Session["SCart"];
                 }
                 if (this.Session["Sl_init"] != null)
                 {
                     this.sl_init_amt = (SortedList<string, string>) this.Session["Sl_init"];
                 }
                 if (this.Session["Sl_tech"] != null)
                 {
                     this.sl_tech_amt = (SortedList<string, string>) this.Session["Sl_tech"];
                 }
                 int num4 = 0;
                 foreach (XObjs.Shopping_card _card in this.lt_cart)
                 {
                     this.f_dets.twalletID = num2.ToString();
                     this.f_dets.fee_listID = _card.xid;
                     this.f_dets.xlogstaff = this.adminID;
                     this.f_dets.xqty = _card.qty;
                     this.f_dets.xused = "0";
                     this.f_dets.tot_amt = _card.total_amt.ToString();
                     this.xtotal_amt += Convert.ToInt32(_card.total_amt);
                     this.f_dets.init_amt = this.sl_init_amt[_card.xid];
                     this.f_dets.tech_amt = this.sl_tech_amt[_card.xid];
                     this.f_dets.xreg_date = this.xreg_date;
                     this.f_dets.xsync = "0";
                     this.f_dets.xvisible = "1";
                     num3 = this.reg.addFee_details(this.f_dets);
                     num4++;
                     for (int i = 0; i < Convert.ToInt32(_card.qty); i++)
                     {
                         int num6 = 0;
                         this.c_hwall.transID = this.scard.xnum;
                         this.c_hwall.used_status = "Not Used";
                         this.c_hwall.product_title = "";
                         this.c_hwall.xreg_date = this.xreg_date;
                         this.c_hwall.used_date = "";
                         this.c_hwall.fee_detailsID = num3.ToString();
                         num6 = this.reg.addHwallet(this.c_hwall);
                     }
                 }
                 if (num4 == this.lt_cart.Count<XObjs.Shopping_card>())
                 {
                     base.Response.Redirect("./m_invoicet.aspx?mx=" + this.adminID + "&tx=" + this.scard.xnum);
                 }
             }
         }
         else
         {
             this.AddFeeList();
         }
     }
 }
Пример #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.Session["Sl_init"] = null;
         this.Session["Sl_tech"] = null;
         this.Session["SCart"] = null;
         this.Session["SItems"] = null;
         this.Session["c_app"] = null;
         this.fillAmtList();
         if ((((base.Request.Form["agentType"] != null) && (base.Request.Form["agentType"].ToString() != "")) && (base.Request.Form["pwalletID"] != null)) && (base.Request.Form["pwalletID"].ToString() != ""))
         {
             this.adminID = base.Request.Form["pwalletID"].ToString();
             this.Session["pwalletID"] = base.Request.Form["pwalletID"].ToString();
             this.agentType = base.Request.Form["agentType"].ToString();
             this.Session["agentType"] = base.Request.Form["agentType"].ToString();
             if (this.agentType == "Agent")
             {
                 this.c_reg = this.ret.getRegistrationByID(base.Request.Form["pwalletID"].ToString());
                 this.Session["c_reg"] = this.c_reg;
             }
             else
             {
                 this.c_sub = this.ret.getSubAgentByID(base.Request.Form["pwalletID"].ToString());
                 this.Session["c_sub"] = this.c_sub;
                 this.c_sub_reg = this.ret.getRegistrationBySubagentRegistrationID(this.c_sub.RegistrationID);
                 this.Session["c_sub_reg"] = this.c_sub_reg;
             }
         }
         else
         {
             base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
         }
     }
     else if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
     {
         this.adminID = this.Session["pwalletID"].ToString();
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
 }
Пример #13
0
 public List<XObjs.Registration> getAllRegistrations()
 {
     List<XObjs.Registration> list = new List<XObjs.Registration>();
     SqlConnection connection = new SqlConnection(hf.ConnectXhome());
     SqlCommand command = new SqlCommand("SELECT * FROM registrations  ", connection);
     connection.Open();
     command.CommandTimeout = 0;
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         XObjs.Registration item = new XObjs.Registration {
             xid = reader["xid"].ToString(),
             AccrediationType = reader["AccrediationType"].ToString(),
             Sys_ID = reader["Sys_ID"].ToString(),
             Firstname = hf.ConvertTab2Apos(reader["Firstname"].ToString()),
             Surname = hf.ConvertTab2Apos(reader["Surname"].ToString()),
             Email = hf.ConvertTab2Apos(reader["Email"].ToString()),
             xpassword = reader["xpassword"].ToString(),
             DateOfBrith = reader["DateOfBrith"].ToString(),
             IncorporatedDate = reader["IncorporatedDate"].ToString(),
             Nationality = reader["Nationality"].ToString(),
             PhoneNumber = reader["PhoneNumber"].ToString(),
             CompanyName = reader["CompanyName"].ToString(),
             CompanyAddress = reader["CompanyAddress"].ToString(),
             ContactPerson = reader["ContactPerson"].ToString(),
             ContactPersonPhone = reader["ContactPersonPhone"].ToString(),
             CompanyWebsite = reader["CompanyWebsite"].ToString(),
             Certificate = reader["Certificate"].ToString(),
             Introduction = reader["Introduction"].ToString(),
             Principal = reader["Principal"].ToString(),
             xreg_date = reader["xreg_date"].ToString(),
             xstatus = reader["xstatus"].ToString(),
             xvisible = reader["xvisible"].ToString(),
             xsync = reader["xsync"].ToString()
         };
         list.Add(item);
     }
     reader.Close();
     return list;
 }
Пример #14
0
 public XObjs.Registration getRegistrationBySubagentRegistrationID(string RegistrationID)
 {
     XObjs.Registration registration = new XObjs.Registration();
     SqlConnection connection = new SqlConnection(hf.ConnectXhome());
     SqlCommand command = new SqlCommand("SELECT * FROM registrations WHERE (xid='" + RegistrationID + "')  ", connection);
     connection.Open(); command.CommandTimeout = 0;
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         registration.xid = reader["xid"].ToString();
         registration.AccrediationType = reader["AccrediationType"].ToString();
         registration.Sys_ID = reader["Sys_ID"].ToString();
         registration.Firstname = hf.ConvertTab2Apos(reader["Firstname"].ToString());
         registration.Surname = hf.ConvertTab2Apos(reader["Surname"].ToString());
         registration.Email = hf.ConvertTab2Apos(reader["Email"].ToString());
         registration.xpassword = hf.ConvertTab2Apos(reader["xpassword"].ToString());
         registration.DateOfBrith = reader["DateOfBrith"].ToString();
         registration.IncorporatedDate = reader["IncorporatedDate"].ToString();
         registration.Nationality = reader["Nationality"].ToString();
         registration.PhoneNumber = reader["PhoneNumber"].ToString();
         registration.CompanyName = hf.ConvertTab2Apos(reader["CompanyName"].ToString());
         registration.CompanyAddress = hf.ConvertTab2Apos(reader["CompanyAddress"].ToString());
         registration.ContactPerson = hf.ConvertTab2Apos(reader["ContactPerson"].ToString());
         registration.ContactPersonPhone = reader["ContactPersonPhone"].ToString();
         registration.CompanyWebsite = hf.ConvertTab2Apos(reader["CompanyWebsite"].ToString());
         registration.Certificate = reader["Certificate"].ToString();
         registration.Introduction = reader["Introduction"].ToString();
         registration.Principal = reader["Principal"].ToString();
         registration.xreg_date = reader["xreg_date"].ToString();
         registration.xstatus = reader["xstatus"].ToString();
         registration.xvisible = reader["xvisible"].ToString();
         registration.xsync = reader["xsync"].ToString();
     }
     reader.Close();
     return registration;
 }
Пример #15
0
 protected void Save_Click(object sender, EventArgs e)
 {
     this.ccode = ConfigurationManager.AppSettings["ccode"];
     this.x_code = ConfigurationManager.AppSettings["xcode"];
     if (this.xpassword.Text != "")
     {
         this.password_text = this.xpassword.Text;
         this.new_hash = this.hash.GetGetSHA512String(this.ccode + this.password_text + this.x_code);
     }
     string str = "";
     if ((this.Session["AgentType"] != null) && (this.Session["AgentType"].ToString() != ""))
     {
         str = this.Session["AgentType"].ToString();
     }
     if (str == "Agent")
     {
         this.adminID = this.ret.getAgentLogDetails(this.xemail.Text, this.new_hash);
         this.c_reg = this.ret.getRegistrationByID(this.adminID);
         this.Session["c_reg"] = this.c_reg;
     }
     else
     {
         this.adminID = this.ret.getSubAgentLogDetails(this.xemail.Text, this.new_hash);
         this.c_sub = this.ret.getSubAgentByID(this.adminID);
         this.Session["c_sub"] = this.c_sub;
         this.c_sub_reg = this.ret.getRegistrationBySubagentRegistrationID(this.c_sub.RegistrationID);
         this.Session["c_sub_reg"] = this.c_sub_reg;
     }
     if (this.adminID != "0")
     {
         if (this.ret.addAdminLog(this.adminID, RemoteIP, remote_host, remote_user, server_name, server_url) != "")
         {
             this.Session["pwalletID"] = this.adminID;
             base.Response.Redirect("./A/profile.aspx");
         }
         else
         {
             base.Response.Redirect("./login.aspx");
         }
     }
 }