Beispiel #1
0
 public AddressFormComponent TypeInFirstName(string text)
 {
     FirstNameInput.Click();
     FirstNameInput.Clear();
     FirstNameInput.SendKeys(text);
     return(this);
 }
        private void AddRow_Click(object sender, EventArgs e)
        {
            EmployeePayroll employeePayRoll = new EmployeePayroll();

            employeePayRoll.EmployeeFirstName = FirstNameInput.Text;

            employeePayRoll.EmployeeLastName = LastNameInput.Text;

            employeePayRoll.EmployeeEmail = EmailInput.Text;

            double PayRate = 0;

            double.TryParse(PayRateInput.Text, out PayRate);
            employeePayRoll.EmployeePayRate = PayRate;

            double Quantity = 0;

            double.TryParse(QtyInput.Text, out Quantity);
            employeePayRoll.TaskQty = Quantity;

            double ExtraPay = 0;

            double.TryParse(ExtraInput.Text, out ExtraPay);
            employeePayRoll.EmployeeExtraPay = ExtraPay;

            double TotalPay = 0;

            double.TryParse(TotalPayInput.Text, out TotalPay);
            employeePayRoll.EmployeeTotalPay = TotalPay;

            employeePayRoll.EmployeeComments = CommentsInput.Text;

            // Display the new information in the grid from the field.
            dataGridView1.Rows.Add(FirstNameInput.Text, LastNameInput.Text, EmailInput.Text, PayRate, Quantity, ExtraPay, TotalPay, CommentsInput.Text);
            dataGridView1.Columns[0].DisplayIndex = 0;

            // Clear out the input fields
            FirstNameInput.Clear();
            LastNameInput.Clear();
            EmailInput.Clear();
            PayRateInput.Clear();
            QtyInput.Clear();
            ExtraInput.Clear();
            TotalPayInput.Clear();
            CommentsInput.Clear();
        }
Beispiel #3
0
 public AddressFormComponent ClearFirstNameInput()
 {
     FirstNameInput.Clear();
     return(this);
 }