Exemplo n.º 1
0
        public ActionResult NewClient(string userid)
        {
            var model = new ClientModel();
            var currentUser = UserManager.Current();
            if (currentUser != null)
            {
                if (!string.IsNullOrEmpty(userid))
                {
                    var lstClient = _videoService.GetClients(string.Empty, int.Parse(userid)).ToList();

                    foreach (var item in lstClient)
                    {
                        model.Main_Email = item.Main_Email;
                        model.Name = item.Name;
                        model.Main_URL = item.Main_URL;
                        model.Main_Phone = item.Main_Phone;
                        model.Row_Id = item.Row_Id;
                    }
                }

            }
            return PartialView("Controls/Video/_CreateClient", model);

            //if (!string.IsNullOrEmpty(userid))
            //{
            //    return PartialView("Controls/Video/_CreateClient", model);
            //}
            //else
            //{
            //    //model.IsActive = true;
            //    return PartialView("Controls/Video/_CreateClient", model);
            //}
        }
Exemplo n.º 2
0
 public ActionResult AddorUpdate(ClientModel model)
 {
     _videoService.AddOrUpdate(model);
     var ClientlistModel = _videoService.GetClients().ToList();
     return PartialView("Controls/Video/_ClientList", ClientlistModel);
 }