Пример #1
0
        public static JsonResults GetEmployeeList()
        {
            JsonResults emplList = new JsonResults();
            LoginUser   currentUser;

            try
            {
                if (!GetUserSession(out currentUser))
                {
                    emplList.ErrorCode    = 1001;
                    emplList.ErrorMessage = "";
                }

                AdminManagerSP customerObj = new AdminManagerSP();
                if (customerObj.GetEmployeeList(currentUser.CompanyID, currentUser.UserId, false, out emplList))
                {
                    emplList.ErrorCode    = 0;
                    emplList.ErrorMessage = "";
                }
                else
                {
                    emplList.ErrorCode    = -1;
                    emplList.ErrorMessage = "Failed to get Employee List. please try again later";
                }
            }
            catch (Exception ex)
            {
                Utils.Write(ex);
            }

            return(emplList);
        }