public void ProcessRequest(HttpContext context)
        {
            JavaScriptSerializer ser = new JavaScriptSerializer();

            Retriever pp2 = new Retriever();

            List<XObjs.Registration> kk = pp2.getAllRegistrations44();

            context.Response.ContentType = "application/json";
            context.Response.Write(ser.Serialize(kk));
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
            {
                this.adminID = this.Session["pwalletID"].ToString();
                Retriever ret = new  Retriever();
                Classes.XObjs.Registration c_reg = ret.getRegistrationByID(adminID);

                xname.Value =  c_reg.Sys_ID;
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            var pp = context.Request["vid"];
            String dd = "";
            JavaScriptSerializer ser = new JavaScriptSerializer();

            Retriever pp2 = new Retriever();
            XObjs.Registration kk = pp2.getRegistrationBySubagentRegistrationID2(pp);

            context.Response.ContentType = "application/json";
            context.Response.Write(ser.Serialize(kk));
        }
        public void ProcessRequest(HttpContext context)
        {
            JavaScriptSerializer ser = new JavaScriptSerializer();
            var pp = context.Request["vv"];

            Branch_Collect dd7 = ser.Deserialize<Branch_Collect>(pp);
            Retriever dd2 = new Retriever();

               ser.MaxJsonLength = 2147483644;

            List<BranchCollect> pp2 = dd2.getBranchCollect(dd7.Agent_Code, dd7.TransactionId);

            context.Response.ContentType = "application/json";
            context.Response.Write(ser.Serialize(pp2));
        }
Beispiel #5
0
        public void ProcessRequest(HttpContext context)
        {
            var pp = context.Request["vid"];
            string message = "";
            String dd = "";
            string vid2 = Convert.ToString(pp);

            Ipong.Classes.Retriever kp = new Ipong.Classes.Retriever();

            Ipong.Classes.XObjs.Registration pp4 = kp.getRegistrationBySubagentRegistrationID(vid2);
            JavaScriptSerializer ser = new JavaScriptSerializer();
              //  XObjs.Registration px = kp.getRegistrationBySubagentRegistrationID(vid2);
            if (pp4.Sys_ID == null || pp4.Sys_ID == "")
            {

                int vmax = kp.getMaxSysId();
                vmax = vmax + 1;
                String vsys_id = "CLD/RA/0" + vmax;

                kp.updateRegistrationSysID(vid2, vsys_id);

                kp.addRoles(vsys_id, "Agent");
                kp.addRoles(vsys_id, "Payment");

                pp4.Sys_ID = vsys_id;
                sendemail(pp4);

                message = "success";

            }

            else
            {

                kp.addRoles(pp4.Sys_ID, "Agent");

                kp.addRoles(pp4.Sys_ID, "Payment");
                sendemail(pp4);
                message = "success";
            }

            context.Response.ContentType = "application/json";
            context.Response.Write(ser.Serialize(message));
        }
Beispiel #6
0
        public void ProcessRequest(HttpContext context)
        {
            var pp = context.Request["vid"];
            string message = "";
            String dd = "";
            string vid2 = Convert.ToString(pp);

            Ipong.Classes.Retriever kp = new Ipong.Classes.Retriever();

            Ipong.Classes.XObjs.Registration pp4 = kp.getRegistrationBySubagentRegistrationID(vid2);
            JavaScriptSerializer ser = new JavaScriptSerializer();
            //  XObjs.Registration px = kp.getRegistrationBySubagentRegistrationID(vid2);

                kp.updateRegistrationSysID4(vid2, "REFUSED");

                sendemail(pp4);

                message = "success";

            context.Response.ContentType = "application/json";
            context.Response.Write(ser.Serialize(message));
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
            {
                this.adminID = this.Session["pwalletID"].ToString();

                Retriever ret3 = new Retriever();
                Classes.XObjs.Registration c_reg2 = ret3.getRegistrationByID(adminID);

                xname.Value = c_reg2.Sys_ID;
            }
            else
            {
                base.Response.Redirect("../a_login.aspx");
            }
            if ((this.Session["log_date"] != null) && (this.Session["log_date"].ToString() != ""))
            {
                this.log_date = this.Session["log_date"].ToString();
            }
            if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != ""))
            {
                this.agentType = this.Session["agentType"].ToString();
            }
            else
            {
               base.Response.Redirect("../a_login.aspx");

              //  base.Response.Redirect("http://88.150.164.30/IpoNigeria");

            }
            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;
                        hfImage1.Value = this.cust_id;
                        hfImage2.Value = this.c_reg.xid;
                        this.email = this.c_reg.Email;
                        this.mobile = this.c_reg.PhoneNumber;
                        this.Session["coy_name"] = this.coy_name;
                        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 = (XObjs.Subagent)this.Session["c_sub"];
                        this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname;
                        this.email = this.c_sub.Email;
                        this.mobile = this.c_sub.Telephone;
                    }
                    if (this.Session["c_sub_reg"] != null)
                    {
                        this.c_sub_reg = (XObjs.Registration)this.Session["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["coy_name"] = this.coy_name;
                    this.Session["fullname"] = this.fullname;
                    this.Session["email"] = this.email;
                    this.Session["mobile"] = this.mobile;
                    this.Session["c_addy"] = this.c_sub_reg.CompanyAddress;
                }
            }
        }
Beispiel #8
0
        public static PortalAA ImportToDataTable(string FilePath, string SheetName)
        {
            DataTable dt = new DataTable();
            FileInfo fi = new FileInfo(FilePath);
            PortalAA dd = null;

            // Check if the file exists
            if (!fi.Exists)
                throw new Exception("File " + FilePath + " Does Not Exists");

            using (ExcelPackage xlPackage = new ExcelPackage(fi))
            {
                // get the first worksheet in the workbook
                ExcelWorksheet worksheet = xlPackage.Workbook.Worksheets[SheetName];

                // Fetch the WorkSheet size
                ExcelCellAddress startCell = worksheet.Dimension.Start;
                ExcelCellAddress endCell = worksheet.Dimension.End;
                 dd = new PortalAA();
                // create all the needed DataColumn
                for (int col = startCell.Column; col <= endCell.Column; col++)
                    dt.Columns.Add(col.ToString());
                int rol = 1;
                // place all the data into DataTable
                for (int row = startCell.Row; row <= endCell.Row; row++)
                {
                    DataRow dr = dt.NewRow();
                    int x = 0;
                    for (int col = startCell.Column; col <= endCell.Column; col++)
                    {
                      //  sp =Convert.ToString( worksheet.Cells[row, col].Value); ;
                        if (row != 1)
                        {
                            dr[x++] = worksheet.Cells[row, col].Value;

                            if (col == 1)
                            {
                                dd.transID =Convert.ToString( worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 2)
                            {
                                dd.amt = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 3)
                            {
                                dd.agt = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 4)
                            {
                                dd.applicantname = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 5)
                            {
                                dd.applicantemail = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 6)
                            {
                                dd.applicantpnumber = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 7)
                            {
                                dd.applicant_addy = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 8)
                            {
                                dd.product_title = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 9)
                            {
                                dd.item_code = Convert.ToString(worksheet.Cells[row, col].Value); ;

                            }

                            if (col == 10)
                            {
                                dd.pc= Convert.ToString(worksheet.Cells[row, col].Value); ;

                                dd.xgt = "xpay";
                                XObjs.Registration ap = null;
                                Retriever pp = new Retriever();
                                ap = pp.getRegistrationBySysID2(dd.agt);
                                if (ap != null)
                                {
                                    dd.agentname = ap.Surname;
                                    dd.agentemail = ap.Email;
                                    dd.agentpnumber = ap.PhoneNumber;
                                }

                            }
                        }
                    }
                   // dt.Rows.Add(dr);
                    rol = rol + 1;
                }
            }
            return dd;
        }
Beispiel #9
0
        public PortalAA readExcel5(string Filename)
        {
            XObjs.Registration ap = null;
            string path = Filename;
            string szConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1'";
            //   string szConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
            OleDbConnection conn = new OleDbConnection(szConn);
            conn.Open();

            OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", conn);
            OleDbDataAdapter adpt = new OleDbDataAdapter(cmd);
            DataSet ds = new DataSet();
            adpt.Fill(ds);
            string email = "";
            string user_name = "";
            string password = "";

            PortalAA dd2 = new PortalAA();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                // Result pp = new Result();
                //  string data = string.Format("F1:{0}, F2:{1}, F3:{2}", dr[0], dr[1], dr[2]);
                dd2.transID = Convert.ToString(dr[0]);
                dd2.amt = Convert.ToString(dr[1]);
                dd2.agt = Convert.ToString(dr[2]);
                dd2.xgt = "xpay";
                dd2.applicantname = Convert.ToString(dr[3]);
                dd2.applicantemail = Convert.ToString(dr[4]);

                dd2.applicantpnumber = Convert.ToString(dr[5]);

                dd2.applicant_addy = Convert.ToString(dr[6]);

                Retriever pp = new Retriever();
                ap = pp.getRegistrationBySysID2(dd2.agt);
                if (ap != null)
                {
                    dd2.agentname = ap.Surname;
                    dd2.agentemail = ap.Email;
                    dd2.agentpnumber = ap.PhoneNumber;
                }
                dd2.product_title = Convert.ToString(dr[7]);
                dd2.item_code = Convert.ToString(dr[8]);
                dd2.pc = Convert.ToString(dr[8]);
                //  pp.subject_code = Convert.ToString(dr[1]);
                //  pp.score = Convert.ToInt32(dr[2]);
                // pp.score = null;

            }

            conn.Close();
            return dd2;
        }