Beispiel #1
0
        public IActionResult SaveOrder([FromBody] NewOrderShippingInputModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var res = repo.SaveOrder(model);

            return(Ok(new { Result = res }));
        }
Beispiel #2
0
        public bool SaveOrder(NewOrderShippingInputModel input)
        {
            string res;

            using (IDbConnection db = new SqlConnection(Global.Connection))
            {
                res = db.Query <string>("sp_OrderAsSMS", input,
                                        commandType: CommandType.StoredProcedure).FirstOrDefault();
            }
            return(res.Length != 0);
        }