Esempio n. 1
0
        public void Register([FromBody] registorInfo Info)
        {
            if (!ModelState.IsValid)
            {
                throw new Exception();
            }

            string queryString =
                "INSERT INTO API_transnet_Primary (email, passwor, imageurl, payment_no, payment_confirm, bought_today) VALUES( \'" + Info.Email + "\', \'" + Info.Password + "\', \'" + Info.ImageUrl + "\', \'" + Info.payment_no + "\' " +
                ", " + Info.payment_confirm + ", " + Info.bought_today + " )";

            LOG_TO_DB(queryString);
        }
Esempio n. 2
0
        public bool Login([FromBody] registorInfo Info)
        {
            string queryString =
                "SELECT email, passwor FROM API_transnet_Primary WHERE email = \'" + Info.fromMonth + "\'";
            string test = Auth_(queryString).ToString();

            if (test == Info.Password.ToString())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        public bool Pay([FromBody] registorInfo Info)
        {
            if (!ModelState.IsValid)
            {
                throw new Exception();
            }
            Info.payment_confirm = 0;
            Info.bought_today    = 1;
            string queryString =
                "INSERT INTO API_transnet_Secondary (email, passwor, imageurl, payment_no, payment_confirm, bought_today) VALUES( \'" + Info.fromMonth + "\', \'" + Info.Password + "\', \'" + Info.ImageUrl + "\', \'" + Info.payment_no + "\' " +
                ", " + Info.payment_confirm + ", " + Info.bought_today + " )";

            if (LOG_TO_DB(queryString))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }