private void button1_Click(object sender, EventArgs e) { Employees2 emp = new Employees2(password, empnum, priv); emp.Show(); this.Hide(); }
private void back_Click(object sender, EventArgs e) { Employees2 ad = new Employees2(empno); ad.Show(); this.Close(); }
private void button6_Click(object sender, EventArgs e) { Employees2 VR = new Employees2(Emp_id); VR.Show(); this.Close(); }
private void Button1_Click(object sender, EventArgs e) { int prvg = controllerObj.CheckPassword(TxtBx_username.Text, TxtBx_pass.Text); if (prvg > 0) { if (prvg == 1) { if (controllerObj.checkEmpid((int)id.Value)) { Employees2 adm = new Employees2(TxtBx_pass.Text, (int)id.Value, prvg); adm.Show(this); TxtBx_username.Clear(); TxtBx_pass.Clear(); id.Refresh(); } else { MessageBox.Show("Incorrect ID"); } } else if (prvg == 2) { if (controllerObj.checkUserid((int)id.Value)) { User1 usr = new User1((int)id.Value); usr.Show(this); TxtBx_username.Clear(); TxtBx_pass.Clear(); id.Refresh(); this.Hide(); } else { MessageBox.Show("Incorrect ID"); } } else if (prvg == 3) { if (controllerObj.checkSuperid((int)id.Value)) { Admin usr = new Admin((int)id.Value); usr.Show(this); TxtBx_username.Clear(); TxtBx_pass.Clear(); id.Refresh(); this.Hide(); } else { MessageBox.Show("Incorrect ID"); } } } else { MessageBox.Show("Incorrect Password or Email or ID"); } }
private void Button1_Click(object sender, EventArgs e) { Employees2 ad = new Employees2(emp_id); ad.Show(); this.Hide(); }
private void button2_Click(object sender, EventArgs e) { if (userno < 111111) { User1 ad = new User1(userno); ad.Show(); this.Close(); } else { Employees2 ad = new Employees2(userno); ad.Show(); this.Close(); } }
private void finish_Click(object sender, EventArgs e) { int price = 0; if ((textBox1.Text != "VIP" && textBox1.Text != "Normal") || Date.Text == "yyyy-mm-dd" || (int)FromStCB.SelectedValue == 0 || (int)ToStCB.SelectedValue == 0) { MessageBox.Show("Invalid Data! Fill all fields with Correct Data!"); } else { if (textBox1.Text == "VIP" && TrackVal == 1) { price = 100; } if (textBox1.Text == "Normal" && TrackVal == 1) { price = 50; } if (textBox1.Text == "VIP" && TrackVal == 2) { price = 120; } if (textBox1.Text == "Normal" && TrackVal == 2) { price = 60; } if (textBox1.Text == "VIP" && TrackVal == 3) { price = 140; } if (textBox1.Text == "Normal" && TrackVal == 3) { price = 70; } if (textBox1.Text == "VIP" && TrackVal == 4) { price = 180; } if (textBox1.Text == "Normal" && TrackVal == 4) { price = 90; } ticket_no = controllerObj.MaxTicketID() + 1; pass_no = controllerObj.MaxPasstID() + 1; t_price = price; if (sexbox.SelectedIndex == 0) { p_sex = "M"; } else { p_sex = "F"; } ticket_type = textBox1.Text; resrve_date = Date.Text; from_station = (int)FromStCB.SelectedValue; to_station = (int)ToStCB.SelectedValue; track_no = (int)TrackCB.SelectedValue; int p2 = controllerObj.InsertPassengerEmp(pass_no, nametextbox.Text, (int)agebox.Value, p_sex); int p1 = controllerObj.InsertTicketfromEmp(ticket_no, t_price, ticket_type, resrve_date, (int)SelTimeCB.SelectedValue, emp_no, pass_no, from_station, to_station, track_no); if (p1 == 0 || p2 == 0) { MessageBox.Show("Error! Invalid Data!"); } else { MessageBox.Show("Reservation done Successfully!"); } Employees2 ad = new Employees2(emp_no); ad.Show(); this.Close(); } }