public IActionResult EditStatus(TeacherEditStatusModel shift) { TeacherBusiness shiftBusiness = new TeacherBusiness(); var result = shiftBusiness.EditStatus(shift); return(Ok(result)); }
public async Task <ActionResult> EditStatus(TeacherEditStatusModel Teacher) { Teacher.EditBy = _userSessionHelper.GetUserSession().UserName; string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.TEACHER_EDIT_STATUS); var result = await HttpUtilities.PostAsyncApi <ReturnResult <Teacher> >(apiUrl, JsonConvert.SerializeObject(Teacher)); return(Json(result)); }
public ReturnResult <Teacher> EditStatus(TeacherEditStatusModel teacher) { DbProvider dbProvider = new DbProvider(); string outCode = String.Empty; string outMessage = String.Empty; StoredProcedureConfigs <Teacher> storedProcedureConfigs = new StoredProcedureConfigs <Teacher>(); dbProvider.SetQuery(storedProcedureConfigs._UPDATE_STATUS_STORED_PROCEDURE, CommandType.StoredProcedure) .SetParameter("Id", SqlDbType.NVarChar, teacher.Id, 100, ParameterDirection.Input) .SetParameter("Status", SqlDbType.Int, teacher.Status, ParameterDirection.Input) .SetParameter("EditBy", SqlDbType.NVarChar, teacher.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 <Teacher>() { ErrorCode = outCode, ErrorMessage = outMessage, }); }
public ReturnResult <Teacher> EditStatus(TeacherEditStatusModel mouse) { return(TeacherDAL.EditStatus(mouse)); }