Example #1
0
        public IActionResult Delete(TeacherDeleteModel shift)
        {
            TeacherBusiness shiftBusiness = new TeacherBusiness();
            var             result        = shiftBusiness.Delete(shift);

            return(Ok(result));
        }
        public async Task <ActionResult> Delete(TeacherDeleteModel Teacher)
        {
            Teacher.DeletedBy = _userSessionHelper.GetUserSession().UserName;
            string apiUrl = _appUrlHelper.GetApiUrl(ApiUrlPath.TEACHER_DELETE);
            var    result = await HttpUtilities.PostAsyncApi <ReturnResult <Teacher> >(apiUrl, JsonConvert.SerializeObject(Teacher));

            return(Json(result));
        }
Example #3
0
        public ReturnResult <Teacher> Delete(TeacherDeleteModel teacher)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <Teacher> storedProcedureConfigs = new StoredProcedureConfigs <Teacher>();

            dbProvider.SetQuery(storedProcedureConfigs._DELETE_SINGLE_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.Int, teacher.Id, ParameterDirection.Input)
            .SetParameter("UserName", SqlDbType.NVarChar, teacher.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 <Teacher>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
 public ReturnResult <Teacher> Delete(TeacherDeleteModel mouse)
 {
     return(TeacherDAL.Delete(mouse));
 }