public IActionResult Delete(MonitorSizeDeleteViewModel monitorSize) { MonitorSizeBusiness monitorSizeBusiness = new MonitorSizeBusiness(); var result = monitorSizeBusiness.Delete(monitorSize); return(Ok(result)); }
public async Task <ActionResult> Delete(MonitorSizeDeleteViewModel monitor) { monitor.DeletedBy = _userSessionHelper.GetUserSession().UserName; string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.MONITOR_SIZE_DELETE); var result = await HttpUtilities.PostAsyncApi <ReturnResult <MonitorSize> >(apiUrl, JsonConvert.SerializeObject(monitor)); return(Json(result)); }
public ReturnResult <MonitorSize> Delete(MonitorSizeDeleteViewModel monitorSize) { DbProvider dbProvider = new DbProvider(); string outCode = String.Empty; string outMessage = String.Empty; StoredProcedureConfigs <MonitorSize> storedProcedureConfigs = new StoredProcedureConfigs <MonitorSize>(); dbProvider.SetQuery(storedProcedureConfigs._DELETE_SINGLE_STORED_PROCEDURE, CommandType.StoredProcedure) .SetParameter("Id", SqlDbType.Int, monitorSize.Id, ParameterDirection.Input) .SetParameter("UserName", SqlDbType.NVarChar, monitorSize.DeletedBy, 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 <MonitorSize>() { ErrorCode = outCode, ErrorMessage = outMessage, }); }
public ReturnResult <MonitorSize> Delete(MonitorSizeDeleteViewModel monitorSize) { return(MonitorSizeDAL.Delete(monitorSize)); }