Ejemplo n.º 1
0
        public IActionResult EditStatus(SubjectEditStatusModel subject)
        {
            SubjectBusiness subjectBusiness = new SubjectBusiness();
            var             result          = subjectBusiness.EditStatus(subject);

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

            return(Json(result));
        }
Ejemplo n.º 3
0
        public ReturnResult <Subject> EditStatus(SubjectEditStatusModel mouse)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <Subject> storedProcedureConfigs = new StoredProcedureConfigs <Subject>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_STATUS_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, mouse.Id, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, mouse.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, mouse.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 <Subject>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
Ejemplo n.º 4
0
 public ReturnResult <Subject> EditStatus(SubjectEditStatusModel mouse)
 {
     return(SubjectDAL.EditStatus(mouse));
 }