예제 #1
0
 public IActionResult AddInetMobileOrder([FromBody] AddInetMobileOrdeModel model)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest());
     }
     return(Ok(repo.AddInetMobileOrder(model)));
 }
예제 #2
0
        public bool AddInetMobileOrder(AddInetMobileOrdeModel input)
        {
            string res;

            using (IDbConnection db = new SqlConnection(Global.Connection))
            {
                res = db.Query <string>("sp_AddInetMobileOrder", new
                {
                    String = input.String,
                    Note   = input.Note,
                    Phone  = input.Phone
                },
                                        commandType: CommandType.StoredProcedure).FirstOrDefault();
            }
            return(res == "1");
        }