예제 #1
0
        public ReturnResult <StudySchedule> Edit(StudyScheduleEditModel studySchedule)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <StudySchedule> storedProcedureConfigs = new StoredProcedureConfigs <StudySchedule>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_SINGLE_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.Int, studySchedule.PK_Id, ParameterDirection.Input)
            .SetParameter("StartDate", SqlDbType.DateTime, studySchedule.StartDate, ParameterDirection.Input)
            .SetParameter("EndDate", SqlDbType.DateTime, studySchedule.EndDate, ParameterDirection.Input)
            .SetParameter("ClassId", SqlDbType.Int, studySchedule.ClassId, ParameterDirection.Input)
            .SetParameter("ComputerRoomId", SqlDbType.Int, studySchedule.ComputerRoomId, ParameterDirection.Input)
            .SetParameter("ShiftId", SqlDbType.Int, studySchedule.ShiftId, ParameterDirection.Input)
            .SetParameter("SubjectId", SqlDbType.Int, studySchedule.SubjectId, ParameterDirection.Input)
            .SetParameter("TeacherId", SqlDbType.Int, studySchedule.TeacherId, ParameterDirection.Input)
            .SetParameter("DayOfWeek", SqlDbType.Int, studySchedule.DayOfWeek, ParameterDirection.Input)
            .SetParameter("EmployeeId", SqlDbType.Int, studySchedule.EmployeeId, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, studySchedule.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, studySchedule.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 <StudySchedule>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
        public IActionResult Edit(StudyScheduleEditModel shift)
        {
            StudyScheduleBusiness shiftBusiness = new StudyScheduleBusiness();
            var result = shiftBusiness.Edit(shift);

            return(Ok(result));
        }
예제 #3
0
        public async Task <ActionResult> Edit(StudyScheduleEditModel StudySchedule)
        {
            StudySchedule.EditBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.STUDY_SCHEDULE_EDIT);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <StudyScheduleEditModel> >(apiUrl, JsonConvert.SerializeObject(StudySchedule));

            return(Json(result));
        }
예제 #4
0
 public ReturnResult <StudySchedule> Edit(StudyScheduleEditModel mouse)
 {
     return(StudyScheduleDAL.Edit(mouse));
 }