Esempio n. 1
0
 public IHttpActionResult Put_UpdateHistroyLottery([FromBody] m_History_lottery request, int Id)
 {
     try
     {
         var res = _History_Lottery.UpdateHistory_lottery(request, Id);
         return(Json(res));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Esempio n. 2
0
        public History_lottery UpdateHistory_lottery(m_History_lottery input, int Id)
        {
            var res = db.Database.SqlQuery <History_lottery>("EXEC [LTY].[s_History_lottery_Update] @Id,@number,@type,@Country_id,@price_1,@price_2,@lot_dt",
                                                             new SqlParameter("@Id", Id),
                                                             new SqlParameter("@number", input.number),
                                                             new SqlParameter("@type", input.type),
                                                             new SqlParameter("@Country_id", input.Country_id),
                                                             new SqlParameter("@price_1", input.price_1),
                                                             new SqlParameter("@price_2", input.price_2),
                                                             new SqlParameter("@lot_dt", input.lot_dt)
                                                             ).FirstOrDefault();

            return(res);
        }