void SignUp.INotify.LoginNeeded(Login.Data loginData, string message) { Debug.Log("LoginNeeded"); throw new NotImplementedException(); //mWelcomeForm.SwitchToLoginPage( // loginData.User, loginData.ClearPassword, message); }
static async void getLogin(string user, string pass) { HttpClient client = new HttpClient(); //client.BaseAddress = new Uri("http://127.0.0.1:8000"); client.BaseAddress = new Uri("http://atmauto.jasonfw.com/"); Login lg = new Login { Username = user, Password = pass }; var response = client.PostAsJsonAsync("api/pegawais/mobileauthenticate", lg).Result; if (response.IsSuccessStatusCode) { var a = await response.Content.ReadAsStringAsync(); Debug.WriteLine($"{a}"); Login.Data data = new Login.Data(a); Debug.WriteLine($"{data.name}"); Debug.WriteLine($"{data.role}"); LoginForm.ActiveForm.Hide(); if ($"{data.role}" == "Customer Service") { CustomerServiceForm cf = new CustomerServiceForm(); cf.ShowDialog(); } else if ($"{data.role}" == "Admin") { HomeForm1 hm = new HomeForm1(); hm.ShowDialog(); } else if ($"{data.role}" == "Kasir") { CashierForm hm = new CashierForm(); hm.ShowDialog(); } } else { MessageBox.Show("Incorrect username or password.", "Message"); } }
void Login.INotify.SignUpNeeded( Login.Data loginData) { mNotify.SignUpNeeded(loginData.User, loginData.ClearPassword); }
void Login.INotify.SignUpNeeded( Login.Data loginData) { CancelButtonAction(); }