private void Clear() { TxtFullName.Clear(); TxtPhone.Clear(); TxtUserEmail.Clear(); TxtPassword.Clear(); }
private void TxtSuppName_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { TxtPhone.Focus(); } }
// Kontragent məlumatlarının yenilənməsi: private void BtnUpdate_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrWhiteSpace(TxtCounterpartyName.Text)) { TxtCounterpartyName.BorderBrush = Brushes.Red; TxtCounterpartyName.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtResponsiblePerson.Text)) { TxtResponsiblePerson.BorderBrush = Brushes.Red; TxtResponsiblePerson.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtPhone.Text)) { TxtPhone.BorderBrush = Brushes.Red; TxtPhone.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtAddress.Text)) { TxtAddress.BorderBrush = Brushes.Red; TxtAddress.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtCounterpartyName.Text) || string.IsNullOrWhiteSpace(TxtResponsiblePerson.Text) || string.IsNullOrWhiteSpace(TxtPhone.Text) || string.IsNullOrWhiteSpace(TxtAddress.Text)) { TxtBlcAttention.Text = "Qırmızı sahələr doldurulmalıdır"; return; } if (CmbPosition.SelectedItem == null) { MessageBox.Show("Vəzifə seçin"); return; } TxtBlcAttention.Text = ""; if (db.Counterparties.Count(c => c.Phone == TxtPhone.Text) > 0 && TxtPhone.Text != selectedCounterparty.Phone) { TxtBlcAttention.Text = "Bu telefon nömrəsi artıq qeyd olunub"; TxtPhone.Focus(); return; } if (db.Counterparties.Count(c => c.Mobile == TxtMobile.Text) > 0 && TxtMobile.Text != selectedCounterparty.Mobile) { TxtBlcAttention.Text = "Bu telefon nömrəsi artıq qeyd olunub"; TxtMobile.Focus(); return; } Counterparty counterparty = db.Counterparties.Find(selectedCounterparty.Id); counterparty.Name = TxtCounterpartyName.Text; counterparty.ResponsiblePerson = TxtResponsiblePerson.Text; counterparty.PositionID = db.Positions.First(p => p.Name == CmbPosition.SelectedValue.ToString()).Id; counterparty.Phone = TxtPhone.Text; counterparty.Mobile = TxtMobile.Text; counterparty.Address = TxtAddress.Text; db.SaveChanges(); TxtBlcAttention.Text = "Kontragent yeniləndi"; crmWindow.Refresh(); }
public Form1() { InitializeComponent(); string url = @"http://localhost:8080/"; var connection = new HubConnection(url); _hub = connection.CreateHubProxy("TestHub"); connection.Start().Wait(); _hub.On("SendInfo", x => { DtoContacto contacto = JsonConvert.DeserializeObject <DtoContacto>(x); TxtName.Invoke((MethodInvoker) delegate { // Running on the UI thread TxtName.Text = contacto.Nombre; }); TxtLastName.Invoke((MethodInvoker) delegate { // Running on the UI thread TxtLastName.Text = contacto.Apellido; }); TxtPhone.Invoke((MethodInvoker) delegate { // Running on the UI thread TxtPhone.Text = contacto.Telefono; }); }); _hub.On("SendNotify", x => { MessageBox.Show("Nueva orden"); }); }
private void Reset() { TxtUniqueId.Visible = false; CmbUniqueId.Visible = true; LblBookName.Location = new Point(6, 68); CmdBookName.Location = new Point(121, 62); PnlButtons.Location = new Point(6, 92); PnlUser.Visible = false; PnlUser.Location = new Point(9, 144); PnlDateTime.Visible = false; PnlDateTime.Location = new Point(6, 144); BtnBookReservation.Visible = true; BtnEnd.Visible = false; BtnEnd.Enabled = false; GrbBookCrud.Size = new Size(285, 169); TxtPenalty.ResetText(); TxtStartTime.ResetText(); TxtUniqueId.ResetText(); CmbUniqueId.ResetText(); CmdBookName.ResetText(); TxtName.ResetText(); TxtPhone.ResetText(); TxtSurname.ResetText(); CmbSearchBook.ResetText(); CmbSearchId.ResetText(); }
private void TxtItemCompany_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { TxtPhone.Focus(); } }
private void BtnNewCustomer_Click(object sender, RoutedEventArgs e) { AddCustomer(); // anropar metoden TxtFirstname.Clear(); //ska rensa kundinfon TxtLastname.Clear(); TxtPhone.Clear(); UpdateCustomer(); //anropa metod för att uppdatera så att comboboxen känner av att ny kund skapats }
//Clear all the fiels private void clearfields() { TxtName.Clear(); TxtPhone.Clear(); TxtAdd.Clear(); TxtCity.Clear(); TxtSuburb.Clear(); }
// Yeni kontragentin yaddaşda saxlanılması: private void Save_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrWhiteSpace(TxtCounterpartyName.Text)) { TxtCounterpartyName.BorderBrush = Brushes.Red; TxtCounterpartyName.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtResponsiblePerson.Text)) { TxtResponsiblePerson.BorderBrush = Brushes.Red; TxtResponsiblePerson.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtPhone.Text)) { TxtPhone.BorderBrush = Brushes.Red; TxtPhone.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtAddress.Text)) { TxtAddress.BorderBrush = Brushes.Red; TxtAddress.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtCounterpartyName.Text) || string.IsNullOrWhiteSpace(TxtResponsiblePerson.Text) || string.IsNullOrWhiteSpace(TxtPhone.Text) || string.IsNullOrWhiteSpace(TxtAddress.Text)) { TxtBlcAttention.Text = "Qırmızı sahələr doldurulmalıdır"; return; } if (CmbPosition.SelectedItem == null) { MessageBox.Show("Vəzifə seçin"); return; } TxtBlcAttention.Text = ""; if (db.Counterparties.Count(c => c.Phone == TxtPhone.Text) > 0) { TxtBlcAttention.Text = "Bu telefon nömrəsi artıq qeyd olunub"; TxtPhone.Focus(); return; } Counterparty counterparty = new Counterparty { Name = TxtCounterpartyName.Text, ResponsiblePerson = TxtResponsiblePerson.Text, PositionID = db.Positions.First(p => p.Name == CmbPosition.SelectedValue.ToString()).Id, Phone = TxtPhone.Text, Mobile = TxtMobile.Text, Address = TxtAddress.Text }; db.Counterparties.Add(counterparty); db.SaveChanges(); TxtBlcAttention.Text = "Yeni kontragent yaddaşa yazıldı"; }
public void Save(string email, string name, string lastname, string phone, string address) { BtnCreate.Click(); TxtEmail.EnterText(email); TxtFirstName.EnterText(name); TxtLastName.EnterText(lastname); TxtPhone.EnterText(phone); TxtAddress.EnterText(address); BtnSave.Click(); }
//reset method private void Reset() { TxtName.Clear(); TxtSurname.Clear(); TxtPhone.Clear(); TxtEmail.Clear(); TxtIdCard.Clear(); BtnUpdate.Visibility = Visibility.Hidden; BtnDelete.Visibility = Visibility.Hidden; BtnRead.Visibility = Visibility.Hidden; }
private void BtnClear_Click(object sender, RoutedEventArgs e) { TxtFirstName.Clear(); TxtLastName.Clear(); TxtMiddleName.Clear(); TxtEmail.Clear(); TxtPhone.Clear(); DpDateOfBirth.SelectedDate = null; CmbGender.SelectedItem = null; CmbNationality.SelectedItem = null; }
// Resets all values to default... private void Reset() { TxtName.ResetText(); TxtSurname.ResetText(); TxtPhone.ResetText(); BtnDeleteClient.Visible = false; BtnUpdateClient.Visible = false; NumBookLimit.Value = 3; clickedId = 0; clickedRow = -1; }
public void ClearEmployeeView() { TxtName.Clear(); TxtEmail.Clear(); TxtPhone.Clear(); TxtNoOfHours.Clear(); ChkIsAdmin.IsChecked = false; ChkIsActive.IsChecked = true; TxtUsername.Clear(); TxtPassword.Clear(); }
private void Reset() { TxtName.Clear(); TxtSurname.Clear(); TxtPhone.Clear(); BtnCreate.Visibility = Visibility.Visible; BtnUpdate.Visibility = Visibility.Hidden; BtnDelete.Visibility = Visibility.Hidden; FillClients(); }
protected void Btnotp_Click(object sender, EventArgs e) { if (TxtPhone.Text == "") { TxtPhone.Focus(); TxtPhone.BorderColor = System.Drawing.Color.Red; } else { checkmobile(); } }
private void Reset() { BtnAdd.Visible = true; BtnDel.Visible = false; BtnUpdate.Visible = false; TxtName.ResetText(); TxtPhone.ResetText(); TxtSurname.ResetText(); TxtUniqueId.ResetText(); CmbSearchAdmin.ResetText(); CmbSearchId.ResetText(); }
private void ClearData() { TxtName.Clear(); TxtLastName.Clear(); TxtPhone.Clear(); CbxTipoContacto.SelectedIndex = 0; _filename = ""; PbFotoPerfil.ImageLocation = ""; }
private void BtnNew_Click(object sender, EventArgs e) { dateTimePicker1.Value = System.DateTime.Today; TxtOrder.Clear(); TxtCustomer.Clear(); TxtPhone.Clear(); ComboItem.SelectedIndex = -1; TxtPrice.Clear(); TxtQty.Clear(); TxtTotal.Clear(); TxtOrder.Focus(); }
private void Reset() { BtnAdd.Visible = true; BtnDel.Visible = false; BtnUpdate.Visible = false; TxtLogin.ResetText(); TxtName.ResetText(); TxtPhone.ResetText(); TxtPw.ResetText(); TxtSurname.ResetText(); CkbIsBoss.Checked = false; }
// Kontragent məlumatlarının yenilənməsi: private void BtnSave_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrWhiteSpace(TxtEmployeeName.Text)) { TxtEmployeeName.BorderBrush = Brushes.Red; TxtEmployeeName.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtEmployeeSurname.Text)) { TxtEmployeeSurname.BorderBrush = Brushes.Red; TxtEmployeeSurname.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtPhone.Text)) { TxtPhone.BorderBrush = Brushes.Red; TxtPhone.BorderThickness = new Thickness(2); } if (string.IsNullOrWhiteSpace(TxtEmployeeName.Text) || string.IsNullOrWhiteSpace(TxtEmployeeSurname.Text) || string.IsNullOrWhiteSpace(TxtPhone.Text)) { TxtBlcAttention.Text = "Qırmızı sahələr doldurulmalıdır"; return; } if (CmbPosition.SelectedItem == null) { MessageBox.Show("Vəzifə seçin"); return; } TxtBlcAttention.Text = ""; if (db.Employees.Count(c => c.Phone == TxtPhone.Text) > 0) { TxtBlcAttention.Text = "Bu telefon nömrəsi artıq qeyd olunub"; TxtPhone.Focus(); return; } Employee employee = new Employee { Name = TxtEmployeeName.Text, Surname = TxtEmployeeSurname.Text, Phone = TxtPhone.Text, PositionID = db.Positions.First(p => p.Name == CmbPosition.SelectedValue.ToString()).Id, RecruitmentDate = DpRecruitmentDate.SelectedDate.Value.Date, }; db.Employees.Add(employee); db.SaveChanges(); TxtBlcAttention.Text = "Yeni işçi əlavə olundu."; crmWindow.Refresh(); }
// Reset Text Boxes and radio buttons. Set Id and row index 0 and -1 private void Reset() { TxtName.ResetText(); TxtSurname.ResetText(); TxtUsername.ResetText(); TxtPassword.ResetText(); TxtPhone.ResetText(); RbtnIsBoss.Checked = false; RbtnNotBoss.Checked = false; BtnDeleteUser.Visible = false; BtnUpdateUser.Visible = false; clickedId = 0; clickedRow = -1; }
//Textbox Value Reset private void Reset() { TxtName.Clear(); TxtSurname.Clear(); TxtPhone.Clear(); TxtEmail.Clear(); TxtPassword.Clear(); BtnCreate.Visibility = Visibility.Visible; BtnUpdate.Visibility = Visibility.Hidden; BtnDelete.Visibility = Visibility.Hidden; FillCustomerData(); }
protected void Btnotp_Click(object sender, EventArgs e) { if (TxtPhone.Text == "") { TxtPhone.Focus(); TxtPhone.BorderColor = System.Drawing.Color.Red; } else { checkmobile(); } //Btnotp.Enabled = false; //Btnverify.Visible = true; }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. TxtPassword.SecureTextEntry = true; TxtPasswordConfirmation.SecureTextEntry = true; userController = new UserController(); userController.UserInserted += UserController_UserRegisted; TxtName.ShouldReturn = (textField) => { TxtName.ResignFirstResponder(); return(true); }; TxtMail.ShouldReturn = (textField) => { TxtMail.ResignFirstResponder(); return(true); }; TxtPassword.ShouldReturn = (textField) => { TxtPassword.ResignFirstResponder(); return(true); }; TxtPasswordConfirmation.ShouldReturn = (textField) => { TxtPasswordConfirmation.ResignFirstResponder(); return(true); }; TxtAddress.ShouldReturn = (textField) => { TxtAddress.ResignFirstResponder(); return(true); }; TxtPhone.ShouldReturn = (textField) => { TxtPhone.ResignFirstResponder(); return(true); }; }
/// <summary> /// Skapa ny kund /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnNewCustomer_Click(object sender, RoutedEventArgs e) { newCustomer = new Customer() // Skapar en ny kund { Firstnamne = TxtFirstname.Text, Lastnamne = TxtLastname.Text, Cellphone = TxtPhone.Text, }; listOfCustomers.Add(newCustomer); // lägger till kunden i min lista av kunder TxtFirstname.Clear(); // rensar alla textboxar TxtLastname.Clear(); TxtPhone.Clear(); CboCustomer.ItemsSource = null; // lägger in kunden i listan av valbara kunder CboCustomer.ItemsSource = listOfCustomers; CboCustomer.SelectedIndex = 0; }
void ReleaseDesignerOutlets() { if (BtnEdit != null) { BtnEdit.Dispose(); BtnEdit = null; } if (ImgProfilePicture != null) { ImgProfilePicture.Dispose(); ImgProfilePicture = null; } if (LblChange != null) { LblChange.Dispose(); LblChange = null; } if (TxtAddress != null) { TxtAddress.Dispose(); TxtAddress = null; } if (TxtName != null) { TxtName.Dispose(); TxtName = null; } if (TxtPhone != null) { TxtPhone.Dispose(); TxtPhone = null; } if (ViewProfilePicture != null) { ViewProfilePicture.Dispose(); ViewProfilePicture = null; } }
private void checkValues() { bool emailCheck = checkValiditEmail(TxtEmail.Text); if (emailCheck == false) { TxtEmail.Focus(); showErrorMwssage(3010); return; } if (TxtPhone.Text.Length < 9 || TxtPhone.Text.Length > 11) { TxtPhone.Focus(); showErrorMwssage(3011); return; } string m_PERID = TxtId.Text; char[] digits = m_PERID.PadLeft(9, '0').ToCharArray(); int[] oneTwo = { 1, 2, 1, 2, 1, 2, 1, 2, 1 }; int[] multiply = new int[9]; int[] oneDigit = new int[9]; for (int i = 0; i < 9; i++) { multiply[i] = Convert.ToInt32(digits[i].ToString()) * oneTwo[i]; } for (int i = 0; i < 9; i++) { oneDigit[i] = (int)(multiply[i] / 10) + multiply[i] % 10; } int sum = 0; for (int i = 0; i < 9; i++) { sum += oneDigit[i]; } if (sum % 10 != 0) { showErrorMwssage(3012); TxtId.Focus(); return; } }
protected void BtnReg_Click(object sender, EventArgs e) { if (TxtCity.SelectedValue == "-1") { TxtCity.Focus(); showErrorMwssage(4); } else if (DdlLicensCode.SelectedValue == "-1") { DdlLicensCode.Focus(); showErrorMwssage(5); } else { if (GlobFuncs.IsExist(TxtEmail.Text.ToString()) == true) { TxtEmail.Focus(); showErrorMwssage(6); } else if (checkbox1.Checked != true) { showErrorMwssage(7); } else if (TxtName.Text.Length == 0) { TxtName.Focus(); showErrorMwssage(8); } else if (TxtAddress.Text.Length == 0) { TxtAddress.Focus(); showErrorMwssage(9); } else if (TxtId.Text.Length == 0) { TxtId.Focus(); showErrorMwssage(10); } else if (TxtDateOfBirth.Text.Length == 0) { TxtDateOfBirth.Focus(); showErrorMwssage(11); } else if (TxtLicenseNumber.Text.Length == 0) { TxtLicenseNumber.Focus(); showErrorMwssage(12); } else if (TxtDateOfIssuanceLicense.Text.Length == 0) { TxtDateOfIssuanceLicense.Focus(); showErrorMwssage(13); } else if (TxtEmail.Text.Length == 0) { TxtEmail.Focus(); showErrorMwssage(14); } else if (TxtPass.Text.Length == 0) { TxtPass.Focus(); showErrorMwssage(15); } else if (TxtPhone.Text.Length == 0) { TxtPhone.Focus(); showErrorMwssage(16); } else { string pass = GlobFuncs.Hash(TxtPass.Text.ToString()); Users Us = new Users(-1, TxtName.Text.ToString(), TxtAddress.Text.ToString(), int.Parse(TxtCity.Text.ToString()), TxtId.Text.ToString(), DateTime.Parse(TxtDateOfBirth.Text), TxtLicenseNumber.Text.ToString(), int.Parse(DdlLicensCode.Text.ToString()), DateTime.Parse(TxtDateOfIssuanceLicense.Text), TxtEmail.Text.ToString(), pass, TxtPhone.Text.ToString()); person per = new person(); per = Us.RegUser(); sendRegMessage(per.CustomId, 0.ToString(), per.FullName); Session["Person"] = per; Response.Redirect("PrivateArea.aspx"); } } }