Ejemplo n.º 1
0
        public IActionResult Get()
        {
            //  string path = GetImage();
            //List<user1> user1 = new List<user1>();
            //user1.Add(new user1() { id = 1, age = 24, gender = "Male", created = DateTime.Now, country = "India", knownAs = "Rekha", city = "City", interests = "Yes", introduction = "yo", lastActive = DateTime.Now, lookingFor = "You", name = "one", photoUrl = ChampionsImageFolder + "/Image_2.jfif", Photos = null });
            //user1.Add(new user1() { id = 2, age = 24, gender = "Female", created = DateTime.Now, country = "India", knownAs = "KnownAs", city = "chand", interests = "Yes", introduction = "yo", lastActive = DateTime.Now, lookingFor = "You", name = "one", photoUrl = ChampionsImageFolder + "/Image_3.jfif", Photos = null });
            //user1.Add(new user1() { id = 3, age = 26, gender = "Male", created = DateTime.Now, country = "India", knownAs = "Rana", city = "City", interests = "Yes", introduction = "yo", lastActive = DateTime.Now, lookingFor = "You", name = "one", photoUrl = ChampionsImageFolder + "/Image_4.jfif", Photos = null });
            //user1.Add(new user1() { id = 4, age = 28, gender = "Female", created = DateTime.Now, country = "India", knownAs = "KnownAs", city = "Nangal", interests = "Yes", introduction = "yo", lastActive = DateTime.Now, lookingFor = "You", name = "one", photoUrl = ChampionsImageFolder +  "/Image_5.jfif", Photos = null });
            //user1.Add(new user1() { id = 5, age = 29, gender = "Male", created = DateTime.Now, country = "India", knownAs = "Maya", city = "City", interests = "Yes", introduction = "yo", lastActive = DateTime.Now, lookingFor = "You", name = "one", photoUrl = ChampionsImageFolder +  "/Image_2.jfif", Photos = null });
            var users = _userService.GetAllUsers();

            return(Ok(users));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> List()
        {
            var userList = await _userMasterService.GetAllUsers();

            var model = userList.Select(u => new UserMasterModel
            {
                Id            = u.Id,
                FirstName     = u.FirstName,
                LastName      = u.LastName,
                Email         = u.EmailId,
                Designation   = _designationMasterService.GetDesignationbyIdAsync(u.DesignationId).Designation,
                ContactNumber = u.ContactNumber
            }).ToList();

            return(View(model));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> GetSalesConsultantsByTL(int teamLeaderId)
        {
            var list   = new List <SelectListItemForJson>();
            var scList = (await _userMasterService.GetAllUsers()).Where(x => x.UnderDesId == teamLeaderId);

            if (scList != null && scList.Any())
            {
                foreach (var item in scList.OrderBy(x => x.Id))
                {
                    list.Add(new SelectListItemForJson
                    {
                        id   = item.Id.ToString(),
                        name = item.FirstName + " " + item.LastName
                    });
                }
            }
            return(Json(list));
        }