public IActionResult EditStatus(EmployeeEditStatusModel employee)
        {
            EmployeeBusiness employeeBusiness = new EmployeeBusiness();
            var result = employeeBusiness.EditStatus(employee);

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

            return(Json(result));
        }
        public ReturnResult <Employee> EditStatus(EmployeeEditStatusModel employee)
        {
            DbProvider dbProvider = new DbProvider();
            string     outCode    = String.Empty;
            string     outMessage = String.Empty;
            StoredProcedureConfigs <Employee> storedProcedureConfigs = new StoredProcedureConfigs <Employee>();

            dbProvider.SetQuery(storedProcedureConfigs._UPDATE_STATUS_STORED_PROCEDURE, CommandType.StoredProcedure)
            .SetParameter("Id", SqlDbType.NVarChar, employee.Id, 100, ParameterDirection.Input)
            .SetParameter("Status", SqlDbType.Int, employee.Status, ParameterDirection.Input)
            .SetParameter("EditBy", SqlDbType.NVarChar, employee.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 <Employee>()
            {
                ErrorCode = outCode,
                ErrorMessage = outMessage,
            });
        }
Example #4
0
 public ReturnResult <Employee> EditStatus(EmployeeEditStatusModel employee)
 {
     return(EmployeeDAL.EditStatus(employee));
 }