예제 #1
0
        public IActionResult EditStatus(ComputerRoomEditStatusViewModel computerRoom)
        {
            ComputerRoomBusiness computerRoomBusiness = new ComputerRoomBusiness();
            var result = computerRoomBusiness.EditStatus(computerRoom);

            return(Ok(result));
        }
예제 #2
0
        public async Task <ActionResult> EditStatus(ComputerRoomEditStatusViewModel computerRoom)
        {
            computerRoom.EditBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.COMPUTER_ROOM_EDIT_STATUS);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <ComputerRoom> >(apiUrl, JsonConvert.SerializeObject(computerRoom));

            return(Json(result));
        }
예제 #3
0
        public ReturnResult <ComputerRoom> EditStatus(ComputerRoomEditStatusViewModel computer)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <ComputerRoom> storedProcedureConfigs = new StoredProcedureConfigs <ComputerRoom>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_STATUS_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, computer.Id, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, computer.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, computer.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 <ComputerRoom>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
예제 #4
0
 public ReturnResult <ComputerRoom> EditStatus(ComputerRoomEditStatusViewModel computerRoom)
 {
     return(ComputerRoomDAL.EditStatus(computerRoom));
 }