Ejemplo n.º 1
0
        public IActionResult Edit(SpeedEditViewModel speed)
        {
            SpeedBusiness speedBusiness = new SpeedBusiness();
            var           result        = speedBusiness.Edit(speed);

            return(Ok(result));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Edit(SpeedEditViewModel speed)
        {
            speed.EditBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.SPEED_EDIT);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <SpeedEditViewModel> >(apiUrl, JsonConvert.SerializeObject(speed));

            return(Json(result));
        }
Ejemplo n.º 3
0
        public ReturnResult <Speed> Edit(SpeedEditViewModel speed)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <Speed> storedProcedureConfigs = new StoredProcedureConfigs <Speed>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_SINGLE_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, speed.Pk_id, 100, ParameterDirection.Input)
            .SetParameter("Name", SqlDbType.NVarChar, speed.Name, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, speed.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, speed.EditBy, ParameterDirection.Input)
            .SetParameter("ERROR_CODE", SqlDbType.NVarChar, DBNull.Value, 100, ParameterDirection.Output)
            .SetParameter("ERROR_MESSAGE", SqlDbType.NVarChar, DBNull.Value, 400, ParameterDirection.Output)
            .ExcuteNonQuery()
            .Complete();
            dbProvider.GetOutValue("ERROR_CODE", out outCode)
            .GetOutValue("ERROR_MESSAGE", out outMessage);
            return(new ReturnResult <Speed>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
Ejemplo n.º 4
0
 public ReturnResult <Speed> Edit(SpeedEditViewModel speed)
 {
     return(SpeedDAL.Edit(speed));
 }