Ejemplo n.º 1
0
        public ActionMessage updateQuoteNew(int QuoteID, QuoteUpdateRequest data)
        {
            ActionMessage        ret           = new ActionMessage();
            SqlConnectionFactory sqlConnection = new SqlConnectionFactory();

            using (SqlConnection connection = sqlConnection.GetConnection())
            {
                QuoteDataLayer.GetInstance().updateQuoteNew(connection, QuoteID, data);
                ret.isSuccess = true;
            }
            return(ret);
        }
Ejemplo n.º 2
0
 public void UpdateById(QuoteUpdateRequest model)
 {
     _baseService.SqlAdapter.ExecuteQuery(new DbCommandDef
     {
         DbCommandText = "dbo.Quotes_UpdateById",
         DbCommandType = System.Data.CommandType.StoredProcedure,
         DbParameters  = new SqlParameter[]
         {
             new SqlParameter("@Id", model.Id),
             new SqlParameter("@Quote", model.Quote),
             new SqlParameter("@Author", model.Author)
         }
     });
 }
Ejemplo n.º 3
0
        public ActionMessage updatenew(int id, [FromBody] QuoteUpdateRequest data)
        {
            ActionMessage ret = new ActionMessage();

            try
            {
                ret = QuoteService.GetInstance().updateQuoteNew(id, data);
            }
            catch (Exception ex)
            {
                ret.isSuccess     = false;
                ret.err.msgCode   = "Internal Error !!!";
                ret.err.msgString = ex.ToString();
            }
            return(ret);
        }