示例#1
0
        public HttpResponseMessage FundWithDraw(dynamic SearchForm)
        {
            try
            {
                string Amount    = string.Empty;
                string txtbtc    = string.Empty;
                string BTCAMount = string.Empty;

                string SKey = string.Empty;
                SKey = (string)SearchForm.SKey;
                string UserID = string.Empty;
                UserID    = (string)SearchForm.UserID;
                Amount    = (string)SearchForm.Amount;
                BTCAMount = (string)SearchForm.BTCAMount;
                txtbtc    = (string)SearchForm.txtbtc;
                APPDL     Obj    = new APPDL();
                DataTable DT     = new DataTable();
                string    OUtMsg = "";
                Obj.WithDraw(UserID, Amount, BTCAMount, txtbtc, SKey, out OUtMsg);
                return(Request.CreateResponse(HttpStatusCode.OK, OUtMsg));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#2
0
        public HttpResponseMessage GetROIIncome(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;
            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_ROIincome(HttpContext.Current.Request.Cookies["userId"].Value.ToString());
                List <referralincomePage> UserList = new List <referralincomePage>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new referralincomePage()
                    {
                        Amount = (dr["banktranamount"]).ToString(),
                        BankTranDate = dr["BankTranDate"].ToString(),
                        BankTranRemarks = dr["BankTranRemarks"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#3
0
        public HttpResponseMessage upgradereport(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;
            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_upgradereport(Convert.ToString(UserID));
                List <upgradereportPage> UserList = new List <upgradereportPage>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new upgradereportPage()
                    {
                        Amount = (dr["banktranamount"]).ToString(),
                        BankTranDate = dr["BankTranDate"].ToString(),
                        PaidDetail = dr["PaidDetail"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#4
0
        public HttpResponseMessage GetBTCAddress(dynamic SearchForm)

        {
            try
            {
                string UserID = string.Empty;
                UserID = (string)SearchForm.UserID;


                //CustomerList U = new AppUserAccounts().GetUserDetails(Request);
                string Namee = "";
                APPDL  CLE   = new APPDL();
                Namee = CLE.Fn_GetBTCAddress(UserID);
                string Blance = "";
                if (Namee != "")
                {
                    Blance = Namee;
                }
                return(Request.CreateResponse(HttpStatusCode.OK, Blance));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_Internal_Server_Error"));
            }
        }
示例#5
0
        public HttpResponseMessage Fn_UserInformationFull(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;
            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_UserInformationFull(Convert.ToString(UserID));
                List <CustomerList> UserList = new List <CustomerList>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new CustomerList()
                    {
                        appmstpaid = dr["appmstpaid"].ToString(),
                        appmstDOJ = dr["appmstDOJ"].ToString(),
                        appPaiddatetime = dr["appPaiddatetime"].ToString(),
                        AppMstRegNo = dr["AppMstRegNo"].ToString(),
                        AppmstFName = (dr["AppmstFName"]).ToString(),
                        appmststate = dr["appmststate"].ToString(),
                        appmstcity = dr["appmstcity"].ToString(),
                        AppmstSponsorTotal = dr["AppmstSponsorTotal"].ToString(),
                        appmstLeftTotal = dr["appmstLeftTotal"].ToString(),
                        appmstRightTotal = (dr["appmstRightTotal"]).ToString(),
                        sponsorid = dr["sponsorid"].ToString(),
                        newsponsortotal = dr["newsponsortotal"].ToString(),
                        membersince = dr["membersince"].ToString(),
                        expirydays = dr["expirydays"].ToString(),

                        TeamSales = dr["TeamSales"].ToString(),
                        TWithDraw = dr["TWithDraw"].ToString(),
                        TPending = (dr["TPending"]).ToString(),
                        DirectINcome = dr["DirectINcome"].ToString(),
                        ROI = dr["ROI"].ToString(),
                        TeamIncome = dr["TeamIncome"].ToString(),
                        imagename = dr["imagename"].ToString(),
                        MYpakage = dr["MYpakage"].ToString(),
                        DAysCount = dr["DAysCount"].ToString(),
                        ROICountShow = dr["ROICountShow"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#6
0
        public HttpResponseMessage GetUserInformation(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;

            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_UserInformation(Convert.ToString(UserID));
                List <CustomerList> UserList = new List <CustomerList>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new CustomerList()
                    {
                        appmstpaid = dr["appmstpaid"].ToString(),
                        appmstDOJ = dr["appmstDOJ"].ToString(),
                        appPaiddatetime = dr["appPaiddatetime"].ToString(),
                        AppMstRegNo = dr["AppMstRegNo"].ToString(),
                        AppmstFName = (dr["AppmstFName"]).ToString(),
                        appmststate = dr["appmststate"].ToString(),
                        appmstcity = dr["appmstcity"].ToString(),
                        AppmstSponsorTotal = dr["AppmstSponsorTotal"].ToString(),
                        appmstLeftTotal = dr["appmstLeftTotal"].ToString(),
                        appmstRightTotal = (dr["appmstRightTotal"]).ToString(),
                        sponsorid = dr["sponsorid"].ToString(),
                        Email = (dr["email"]).ToString(),
                        Number = dr["AppMstMobile"].ToString(),
                        BTC = dr["AcountNo"].ToString(),
                        Country = dr["distt"].ToString(),
                        zipCode = dr["appmstpincode"].ToString(),
                        ProfileImage = dr["imagename"].ToString(),
                        Type = dr["Type"].ToString(),
                        Passowrd = dr["AppMstPassword"].ToString(),
                        EPassowrd = dr["ePassword"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#7
0
        public HttpResponseMessage GetSecondLevel(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;

            int PType = 0;

            PType = (int)SearchForm.PType;
            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_TreeSecondLavel(Convert.ToString(UserID), PType);
                List <ClassShapeTree> UserList = new List <ClassShapeTree>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new ClassShapeTree()
                    {
                        AppMstRegNo = (dr["AppMstRegNo"]).ToString(),
                        AppMstFName = dr["AppMstFName"].ToString(),
                        AppMstLeftRight = dr["AppMstLeftRight"].ToString(),
                        SponsorID = dr["SponsorID"].ToString(),
                        ParentID = dr["ParentID"].ToString(),
                        joinfor = dr["joinfor"].ToString(),
                        AppMstLeftTotal = dr["AppMstLeftTotal"].ToString(),
                        AppMstRightTotal = dr["AppMstRightTotal"].ToString(),
                        carryleft = dr["carryleft"].ToString(),
                        carryright = dr["carryright"].ToString(),
                        totalnewleft = dr["totalnewleft"].ToString(),
                        totalnewright = dr["totalnewright"].ToString(),
                        appmstpaid = dr["appmstpaid"].ToString(),
                        LeftMember = dr["LeftMember"].ToString(),
                        rightMember = dr["rightMember"].ToString(),
                        appmstdoj = dr["appmstdoj"].ToString(),
                        ImagePath = dr["imagePath"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
 public HttpResponseMessage GetExchangeRate(dynamic SearchForm)
 {
     try
     {
         DataTable dt  = new DataTable();
         APPDL     CLE = new APPDL();
         dt = CLE.Fn_GetExchangeRate();
         string Blance = "";
         if (dt.Rows.Count > 0)
         {
             Blance = dt.Rows[0]["vpbalance"].ToString();
         }
         return(Request.CreateResponse(HttpStatusCode.OK, Blance));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_Internal_Server_Error"));
     }
 }
示例#9
0
        public HttpResponseMessage Getdownlinedetail(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;
            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_downlinedetail(Convert.ToString(UserID));
                List <downlinedetailPage> UserList = new List <downlinedetailPage>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new downlinedetailPage()
                    {
                        AppMstRegNo = (dr["AppMstRegNo"]).ToString(),
                        membername = dr["membername"].ToString(),
                        AppMstLeftRight = dr["AppMstLeftRight"].ToString(),
                        AppMstMobile = dr["AppMstMobile"].ToString(),
                        AppmstDOJ = (dr["AppmstDOJ"]).ToString(),
                        topupdate = dr["topupdate"].ToString(),
                        jamount = dr["jamount"].ToString(),
                        Appmstpaid = dr["Appmstpaid"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#10
0
        public HttpResponseMessage Getaccountstatement(dynamic SearchForm)
        {
            string UserID = string.Empty;

            UserID = (string)SearchForm.UserID;
            string OutMsg = "No records found";

            try
            {
                APPDL     Obj = new APPDL();
                DataTable DT  = new DataTable();
                DT = Obj.Fn_UserDetail(Convert.ToString(UserID));
                List <accountstatementPage> UserList = new List <accountstatementPage>();
                if (DT.Rows.Count > 0)
                {
                    UserList = (from DataRow dr in DT.Rows
                                select new accountstatementPage()
                    {
                        Amount = (dr["BankTranAmount"]).ToString(),
                        BankTranBalance = dr["BankTranBalance"].ToString(),
                        BankTranRemarks = dr["BankTranRemarks"].ToString(),
                        BankTranDate = dr["BankTranDate"].ToString(),
                        PType = dr["PType"].ToString(),
                        PName = dr["PName"].ToString(),
                        OutAmount = dr["OutAmount"].ToString(),
                        dollar = dr["dollar"].ToString(),
                    }).ToList();
                    return(Request.CreateResponse(HttpStatusCode.OK, UserList));
                }

                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.NotFound, OutMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#11
0
 public HttpResponseMessage GetBlanceVPIncome(dynamic SearchForm)
 {
     try
     {
         string UserID = string.Empty;
         UserID = (string)SearchForm.UserID;
         DataTable dt  = new DataTable();
         APPDL     CLE = new APPDL();
         dt = CLE.Fn_UserVPBlance(UserID);
         string UserBlance = "";
         string ERate      = "00";
         if (dt.Rows.Count > 0)
         {
             UserBlance = dt.Rows[0]["vpbalance"].ToString();
             ERate      = dt.Rows[0]["ERate"].ToString();
         }
         return(Request.CreateResponse(HttpStatusCode.OK, new { Blance = UserBlance, ExchangeRate = ERate }));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_Internal_Server_Error"));
     }
 }
示例#12
0
        public HttpResponseMessage Fundtrasfer(dynamic SearchForm)
        {
            try
            {
                string Amount = string.Empty;

                string PregNo = string.Empty;
                string SKey   = string.Empty;
                SKey = (string)SearchForm.SKey;
                string UserID = string.Empty;
                UserID = (string)SearchForm.UserID;
                Amount = (string)SearchForm.Amount;
                PregNo = (string)SearchForm.PregNo;
                APPDL     Obj    = new APPDL();
                DataTable DT     = new DataTable();
                string    OUtMsg = "";
                Obj.FN_Fundtrasfer(UserID, PregNo, Amount, SKey, out OUtMsg);
                return(Request.CreateResponse(HttpStatusCode.OK, OUtMsg));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }
示例#13
0
        public HttpResponseMessage Purchasepackage(dynamic SearchForm)
        {
            try
            {
                string RegID = string.Empty;
                string Amt   = string.Empty;
                string Type  = string.Empty;
                string OTP   = string.Empty;

                string Amountrate = string.Empty;
                string ConverAmt  = string.Empty;



                OTP        = (string)SearchForm.OTP;
                Type       = (string)SearchForm.Type;
                RegID      = (string)SearchForm.RegID;
                Amt        = (string)SearchForm.Amt;
                Amountrate = (string)SearchForm.Amountrate;
                ConverAmt  = (string)SearchForm.ConverAmt;



                APPDL     Objnew = new APPDL();
                DataTable Dtt    = new DataTable();
                Dtt = Objnew.Fn_UserInformation(Convert.ToString(RegID));
                int appmstpaid = 0;
                if (Dtt.Rows.Count > 0)
                {
                    appmstpaid = Convert.ToInt16(Dtt.Rows[0]["appmstpaid"]);
                }


                UserAppClass Obj = new UserAppClass();
                DataTable    DT  = new DataTable();

                if (appmstpaid == 0)
                {
                    Obj.ActivateUser(RegID, Amt, OTP, Amountrate, ConverAmt);
                    string OUtMsg = "";
                    if (Obj.OutMsg == "1")
                    {
                        OUtMsg = Obj.OutMsg;
                    }
                    else
                    {
                        OUtMsg = Obj.OutMsg;
                    }

                    return(Request.CreateResponse(HttpStatusCode.OK, OUtMsg));
                }

                else
                {
                    Obj.UpgradeUser(ConverAmt, RegID, Amt, OTP, Amountrate);
                    string OUtMsg = "";
                    if (Obj.OutMsg == "1")
                    {
                        OUtMsg = Obj.OutMsg;
                    }
                    else
                    {
                        OUtMsg = Obj.OutMsg;
                    }

                    return(Request.CreateResponse(HttpStatusCode.OK, OUtMsg));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "500_INTERNAL_SERVER_ERROR"));
            }
        }