Esempio n. 1
0
        public IActionResult EditStatus(MonitorEditStatusViewModel monitor)
        {
            MonitorBusiness monitorBusiness = new MonitorBusiness();
            var             result          = monitorBusiness.EditStatus(monitor);

            return(Ok(result));
        }
        public async Task <ActionResult> EditStatus(MonitorEditStatusViewModel monitorSize)
        {
            monitorSize.EditBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.MONITOR_EDIT_STATUS);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <Monitor> >(apiUrl, JsonConvert.SerializeObject(monitorSize));

            return(Json(result));
        }
Esempio n. 3
0
        public ReturnResult <Monitor> EditStatus(MonitorEditStatusViewModel monitor)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <Monitor> storedProcedureConfigs = new StoredProcedureConfigs <Monitor>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_STATUS_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, monitor.Id, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, monitor.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, monitor.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 <Monitor>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
 public ReturnResult <Monitor> EditStatus(MonitorEditStatusViewModel monitor)
 {
     return(MonitorDAL.EditStatus(monitor));
 }