public IActionResult Edit(StorageDeviceEditViewModel storageDevice)
        {
            StorageDeviceBusiness storageDeviceBusiness = new StorageDeviceBusiness();
            var result = storageDeviceBusiness.Edit(storageDevice);

            return(Ok(result));
        }
Beispiel #2
0
        public async Task <ActionResult> Edit(StorageDeviceEditViewModel mouse)
        {
            mouse.EditBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.STORAGE_DEVICE_EDIT);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <StorageDeviceEditViewModel> >(apiUrl, JsonConvert.SerializeObject(mouse));

            return(Json(result));
        }
Beispiel #3
0
        public ReturnResult <StorageDevice> Edit(StorageDeviceEditViewModel storageDevice)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <StorageDevice> storedProcedureConfigs = new StoredProcedureConfigs <StorageDevice>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_SINGLE_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, storageDevice.Pk_id, 100, ParameterDirection.Input)
            .SetParameter("Name", SqlDbType.NVarChar, storageDevice.Name, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, storageDevice.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, storageDevice.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 <StorageDevice>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
 public ReturnResult <StorageDevice> Edit(StorageDeviceEditViewModel storageDevice)
 {
     return(StorageDeviceDAL.Edit(storageDevice));
 }