public SignUpBank(bool a = false) { Admin = a; controllerObj = new Controller(); InitializeComponent(); if (!Admin) { foreach (Control c in Controls) { c.Hide(); } title.Show(); L1.Show(); button_Back.Show(); Verify.Show(); Access.Show(); } else { L1.Hide(); Verify.Hide(); Access.Hide(); } }
private void Verify_Click(object sender, EventArgs e) { string Pass = Convert.ToString(controllerObj.GetAccess("Company").Rows[0][0]); if (Access.Text != Pass) { MessageBox.Show("Incorrect Pass code."); } else { foreach (Control c in Controls) { c.Show(); } L1.Hide(); button_Back.Hide(); Verify.Hide(); Access.Hide(); label2.Visible = false; label3.Visible = false; label1.Visible = false; label4.Visible = false; Current.Visible = false; Complete.Visible = false; Cost.Visible = false; Rating.Visible = false; Save.Visible = false; } }
public SignUpEmployee(bool a = false) { Admin = a; controllerObj = new Controller(); InitializeComponent(); if (!Admin) { foreach (Control c in Controls) { c.Hide(); } title.Show(); L1.Show(); button_Back.Show(); Verify.Show(); Access.Show(); } else { L1.Hide(); Verify.Hide(); Access.Hide(); label2.Visible = true; label3.Visible = true; Current.Visible = true; Complete.Visible = true; } }
public SignUpEmployee(int i) { controllerObj = new Controller(); InitializeComponent(); ID = i; L1.Hide(); Verify.Hide(); Access.Hide(); Btn_SignUp.Hide(); label1.Hide(); TxtBox_PassAgain.Hide(); checkBox_Devil.Hide(); Save.Visible = true; TxtBx_pass.PasswordChar = '\0'; DataTable dt = controllerObj.SelectEmployeeByID(ID); TxtBx_Nationalid.Text = Convert.ToString(dt.Rows[0]["National ID"]); TxtBx_pass.Text = Convert.ToString(dt.Rows[0]["Password"]); string name = Convert.ToString(dt.Rows[0]["Name"]); string[] words = name.Split(' '); textBox_Firstname.Text = words[0]; textBox_Lastname.Text = words[1]; if (Convert.ToString(dt.Rows[0]["Sex"]) == "Male") { radioButton_Male.Checked = true; } else { radioButton_Female.Checked = true; } if (Convert.ToString(dt.Rows[0]["Position"]) == "Manager") { radioButton_Manager.Checked = true; } else if (Convert.ToString(dt.Rows[0]["Position"]) == "Projects") { radioButton_Projects.Checked = true; } else { radioButton_Housing.Checked = true; } dateTimePicker1.Value = Convert.ToDateTime(dt.Rows[0]["Start Date"]); Current.Value = Convert.ToInt32(dt.Rows[0]["Number of Current Projects"]); Complete.Value = Convert.ToInt32(dt.Rows[0]["Number of Completed Projects"]); }
public SignUpBank(string n) { controllerObj = new Controller(); InitializeComponent(); Name = n; L1.Hide(); Verify.Hide(); Access.Hide(); Btn_SignUp.Hide(); label3.Hide(); textBox_PassAgain.Hide(); checkBox_Devil.Hide(); Save.Visible = true; DataTable C = controllerObj.SelectBankByName(Name); textBox_Name.Text = Convert.ToString(C.Rows[0]["Name"]); textBox_Pass.Text = Convert.ToString(C.Rows[0]["Password"]); textBox_TransFees.Text = Convert.ToString(C.Rows[0]["Transfer Fees"]); }
private void Verify_Click(object sender, EventArgs e) { string Pass = Convert.ToString(controllerObj.GetAccess("Admin").Rows[0][0]); if (Access.Text != Pass) { MessageBox.Show("Incorrect Pass code."); } else { foreach (Control c in Controls) { c.Show(); } L1.Hide(); button_Back.Hide(); Verify.Hide(); Access.Hide(); } }
public SignUpCompany(int i) { controllerObj = new Controller(); InitializeComponent(); ID = i; L1.Hide(); Verify.Hide(); Access.Hide(); Btn_SignUp.Hide(); label6.Hide(); textBox_PassAgain.Hide(); checkBox_Devil.Hide(); Save.Visible = true; textBox_Pass.PasswordChar = '\0'; DataTable dt = controllerObj.SelectCompanyByID(ID); textBox_Name.Text = Convert.ToString(dt.Rows[0]["Company"]); textBox_Pass.Text = Convert.ToString(dt.Rows[0]["Password"]); Current.Value = Convert.ToInt32(dt.Rows[0]["Number of Current Projects"]); Complete.Value = Convert.ToInt32(dt.Rows[0]["Number of Completed Projects"]); Cost.Value = Convert.ToInt32(dt.Rows[0]["Average Project Cost"]); Rating.Value = Convert.ToInt32(dt.Rows[0]["Rating"]); }