private void InitLoginToServer(string[] data) { userModel.Login(data [0], data [1], data [2], () => { this.Clear(); this.Init(); }); }
private void Send(string phone) { if (input_password.text == "") { ViewManager.inst.ShowText(Tools.GetMessageById("10011")); } else { if (phone.Equals(userModel.tel)) { ViewManager.inst.CloseView(this); } else { //userModel.Login(Ex_Local.LOGIN_TYPE_TEL, phone, input_password.text, () => userModel.Login(Ex_Local.LOGIN_TYPE_TEL, phone, input_password.text, () => { LocalStore.SetLocal(LocalStore.LOCAL_TYPE, Ex_Local.LOGIN_TYPE_TEL); // LocalStore.DelUids(userModel.uid); LocalStore.SetUids(userModel.uid, userModel.uname, userModel.pwd, Ex_Local.LOGIN_TYPE_TEL, phone); LocalStore.SetLocal(LocalStore.LOCAL_UID, userModel.uid); LocalStore.SetLocal(LocalStore.LOCAL_PWD, userModel.pwd); // LocalStore.SetLocal(LocalStore.LOCAL_UNAME, phone); // LocalStore.SetLocal(LocalStore.LOCAL_PWD, input_password.text); //ViewManager.inst.CloseView(this); //roleModel.otherInfo = null; //alertModel.isOpen = true; //roleModel.uids.Clear(); //ViewManager.inst.CloseScene(); //Dictionary<string, object> dd = new Dictionary<string, object>(); //dd["fuid"] = userModel.uid; // NetHttp.inst.Send(NetBase.HTTP_FUSERGET, dd, (VoHttp vo) => //{ // if (vo.data != null) // { // roleModel.tab_Role_Select1 = roleModel.tab_Role_CurSelect1; // roleModel.tab_Role_Select2 = roleModel.tab_Role_CurSelect2; // roleModel.tab_Role_Select3 = roleModel.tab_Role_CurSelect3; // roleModel.otherInfo = (Dictionary<string, object>)vo.data; // ViewManager.inst.ShowScene<MediatorRoleRoot>(); // } //}); DispatchManager.inst.Dispatch(new MainEvent(MainEvent.RELOGIN_GAME)); }, true); } } }
public IActionResult Index(String User, String pass) { ModelUser user = new ModelUser(); var validacion = user.Login(User, pass); if (validacion == true) { return(RedirectToAction("Index", "Blogs")); } else { ViewBag.mess = "La contraseña o el usuario es incorrecta "; return(View()); } }