Esempio n. 1
0
        private void FinishEmpBtn_Click(object sender, EventArgs e)
        {
            emp.name      = FnameTextbox.Text + " " + LnameTextbox.Text;
            emp.password  = PassTextbox.Text;
            emp.phone     = PhoneNumTextbox.Text;
            emp.rank      = RankTextBox.Text;
            emp.salary    = Convert.ToInt16(SalaryTextbox.Text);
            emp.gender    = gender;
            emp.address   = AddressTextbox.Text;
            emp.admin_id  = 1;
            emp.join_date = Convert.ToDateTime(JoinDatePicker.Text);
            //  MessageBox.Show(emp.join_date.ToString());
            emp.mail = EmailTextbox.Text;
            AdminClass newmanger = new AdminClass();

            newmanger.addmanager(emp);

            FnameTextbox.Clear();
            LnameTextbox.Clear();
            PassTextbox.Clear();
            PhoneNumTextbox.Clear();
            SalaryTextbox.Clear();
            MaleCheck.Checked   = false;
            FemaleCheck.Checked = false;
            AddressTextbox.Clear();
            EmailTextbox.Clear();
            RankTextBox.Text = "";
            MessageBox.Show("Employee Added Successfully");
        }
Esempio n. 2
0
 private void ClearForm()
 {
     if (CustomerId == 0)
     {
         IdTextbox.Text = "0";
         AddressTextbox.Clear();
         AgentTextbox.Clear();
         CompanyNameTextbox.Clear();
         ContactPersonTextbox.Clear();
         CodeTextbox.Clear();
         FaxTextbox.Clear();
         PaymentTextbox.Text = "0";
         TINTextbox.Clear();
         PhoneTextbox.Clear();
     }
     else
     {
         LoadCustomerDetails();
     }
 }