private void btn_Login(object sender, EventArgs e) { OnLogin LoginDelegate = () => Dispatcher.BeginInvoke(() => NavigationService.Navigate(new Uri("/UsersList.xaml", UriKind.Relative))); OnException ExceptionDelegate = (ex) => Dispatcher.BeginInvoke(() => MessageBox.Show(ex.Message)); CTConnection.ResetProxy(); CTConnection.LoginUser(txtName.Text, txtPassword.Password, LoginDelegate, ExceptionDelegate); }
private void btn_Login(object sender, EventArgs e) { OnLogin LoginDelegate = () => Dispatcher.BeginInvoke(() => NavigationService.Navigate(new Uri("/UsersList.xaml", UriKind.Relative))); OnException ExceptionDelegate = (ex) => Dispatcher.BeginInvoke(() => MessageBox.Show(ex.Message)); CTConnection.ResetProxy(); String retmsg = ""; String AccCode = ""; int sindex = lbAccBook.SelectedIndex; if (sindex > -1) { AccCode = AccBookArray[sindex].AccBookID; } CTConnection.LoginUser(txtName.Text, txtPassword.Password, AccCode, retmsg, LoginDelegate, ExceptionDelegate); }