Пример #1
0
        public HttpResponseMessage UpgradeUser(dynamic SearchForm)
        {
            try
            {
                string RegID      = string.Empty;
                string Amt        = string.Empty;
                string OTPCode    = string.Empty;
                string Amountrate = string.Empty;
                string ConverAmt  = string.Empty;
                RegID      = (string)SearchForm.RegID;
                Amt        = (string)SearchForm.Amt;
                ConverAmt  = (string)SearchForm.CAmt;
                Amountrate = (string)SearchForm.Amountrate;
                OTPCode    = (string)SearchForm.OTPCode;
                UserAppClass Obj = new UserAppClass();
                DataTable    DT  = new DataTable();
                Obj.UpgradeUser(ConverAmt, RegID, Amt, OTPCode, 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"));
            }
        }
Пример #2
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"));
            }
        }