Ejemplo n.º 1
0
        public ActionResult InsertMasterData(NewUserVM data)
        {
            var dataResult = JsonConvert.DeserializeObject<List<NewUserVM>>(data.dataList);

            foreach (var item in dataResult)
            {
                var user = new UserModel
                {
                    userEmail = item._userEmail,
                    userName = item._userName,
                    userPhone = item._userPhone,
                    userPwd = item._userPwd
                };
                _IBOUsers.InsertMaster(user);
            }


            return RedirectToAction("InsertMaster");
        }
Ejemplo n.º 2
0
        public ActionResult InsertMasterData(NewUserVM data)
        {
            var dataResult = JsonConvert.DeserializeObject <List <NewUserVM> >(data.dataList);

            foreach (var item in dataResult)
            {
                var user = new UserModel
                {
                    userEmail = item.userEmail,
                    userName  = item.userName,
                    userPhone = item.userPhone,
                    userPwd   = item.userPwd,
                    countryId = item.userCountry,
                    skillIds  = item.uskillIds
                };
                SendMail(user.userEmail, user.userPwd);
                //SendSMS(user.userPhone,user.userName);
                _IBOUsers.InsertMaster(user);
            }


            return(RedirectToAction("InsertMaster"));
        }