예제 #1
0
        public ActionResult GetAllUserData()
        {
            //parameters
            string[] parameters = { "@userid" };
            // param value
            string uid = Request.QueryString["uid"];

            string[] values = { uid };
            //call query DB
            string content = _builder.GetQueryResult("GetAccountInfoByUserID", parameters, values);

            return(Content(content));
        }
예제 #2
0
        public ActionResult GetForSaleItemsByCut(string type)
        {
            //parameters
            string[] parameters = { "@cut" };
            // param value
            string cut = Request.QueryString["type"];

            string[] values = { cut };
            //call query DB
            string content = _builder.GetQueryResult("GetForSaleItemsByCut", parameters, values);

            return(Content(content));
        }
예제 #3
0
        public ActionResult Register()
        {
            string username  = Request.QueryString["usr"];
            string passwword = Request.QueryString["pw"];
            string email     = Request.QueryString["em"];
            string type      = Request.QueryString["tp"];

            if (IsAccountInfoAvailable(username, passwword))
            {
                //parameters
                string[] parameters = { "@username", "@email", "@password", "@type" };
                // param value
                string[] values = { username, email, passwword, type };
                //call query DB
                string content = _builder.GetQueryResult("SaveNewAccount", parameters, values);
                return(Content(content));
            }
            else
            {
                return(Content(null));//_builder.GetNoResult());
            }
        }
예제 #4
0
        public ActionResult Login(string username, string password)
        {
            //parameters
            string[] parameters = { "@username", "@password" };
            // param value
            string un = Request.QueryString["usr"];
            string pw = Request.QueryString["pw"];

            string[] values = { un, pw };
            //call query DB
            string content = _builder.GetQueryResult("FindAccountByUsernamePassword", parameters, values);

            return(Content(content));
        }