void SignInBtn_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { InsertDataSrv.InsertClient webService = new InsertDataSrv.InsertClient(); webService.SignInCompleted += new EventHandler <InsertDataSrv.SignInCompletedEventArgs>(WebService_SignIn); webService.SignInAsync(txtEmail.Text, txtPass.Password); bm.ValidateAll(); }
void WebService_SignIn(object sender, InsertDataSrv.SignInCompletedEventArgs e) { if (e.Result == true) { InsertDataSrv.InsertClient webService = new InsertDataSrv.InsertClient(); webService.SelectCompleted += new EventHandler <InsertDataSrv.SelectCompletedEventArgs>(WebService_SelectCompleted); webService.SelectAsync(txtEmail.Text); } else { System.Windows.MessageBox.Show("Wrong email or password"); } }
private void button1_Click(object sender, RoutedEventArgs e) { vldSum.Errors.Clear(); bm.ValidateAll(); if (vldSum.Errors.Count == 0) { InsertDataSrv.InsertClient webService = new InsertDataSrv.InsertClient(); webService.UpdDataCompleted += new EventHandler <InsertDataSrv.UpdDataCompletedEventArgs>(WebService_UpdateDataCompleted); webService.UpdDataAsync(txtEmail.Text, txtUser.Text, txtPass.Password, cbDD.SelectedValue + "/" + cbMM.SelectedValue + "/" + cbYYYY.SelectedValue, txtAddress.Text, cbPrefix.SelectedValue + txtPN.Text); App.Current.Resources.Remove("Details"); App.Current.Resources.Add("Details", txtUser.Text + "," + txtEmail.Text + "," + txtPass.Password + "," + cbDD.SelectedValue + "/" + cbMM.SelectedValue + "/" + cbYYYY.SelectedValue + "," + txtAddress.Text + "," + cbPrefix.SelectedValue + txtPN.Text); App.Current.Resources.Remove("User"); App.Current.Resources.Add("User", txtUser.Text); App.Current.Resources.Remove("Email"); App.Current.Resources.Add("Email", txtEmail.Text); } else { } }
public Index() { InitializeComponent(); tbWelcome.Text = App.Current.Resources["User"].ToString(); InsertDataSrv.InsertClient insrt = new InsertDataSrv.InsertClient(); insrt.CountUnreadedMsgsCompleted += insrt_CountUnreadedMsgsCompleted; insrt.CountUnreadedMsgsAsync(App.Current.Resources["User"].ToString()); SearchCb.Items.Add("Videos"); SearchCb.Items.Add("Users"); SearchCb.SelectedItem = "Videos"; tbWelcome.MouseEnter += tbWelcome_MouseEnter; tbWelcome.MouseLeave += tbWelcome_MouseLeave; tbWelcome.Foreground = new SolidColorBrush(Colors.Blue); tbWelcome.MouseLeftButtonUp += tbWelcome_MouseLeftButtonUp; SearchBtn.MouseEnter += SearchBtn_MouseEnter; SearchBtn.MouseLeave += SearchBtn_MouseLeave; SearchBtn.MouseLeftButtonUp += SearchBtn_MouseLeftButtonUp; LogOut.MouseEnter += LogOut_MouseEnter; LogOut.MouseLeave += LogOut_MouseLeave; LogOut.MouseLeftButtonUp += LogOut_MouseLeftButtonUp; UploadVid.MouseLeftButtonUp += UploadVid_MouseLeftButtonUp; SharedVid.MouseLeftButtonUp += SharedVid_MouseLeftButtonUp; MyVideos.MouseLeftButtonUp += MyVideos_MouseLeftButtonUp; }