Exemple #1
0
        public ActionResult LoginRS(LoginVM objViewModel)
        {
            try
            {
                if (objViewModel.Imagen != null)
                {
                    var    Descargar = new WebClient();
                    byte[] data      = Descargar.DownloadData(objViewModel.Imagen);
                    objViewModel.objCliente.Imagen = data;
                }
                if (!objViewModel.ExisteClienteRS(objViewModel.objCliente))
                {
                    objViewModel.AddCliente(objViewModel.objCliente);
                }

                Cliente obj = objViewModel.GetClienteRS(objViewModel.objCliente.IDRS);
                Session["objCliente"] = obj; return(RedirectToAction("index", "Cliente"));
            }
            catch (Exception ex)
            {
                string asd = ex.ToString();
                return(RedirectToAction("Index", "Home"));
            }
        }