public ActionResult ReserveForScreen3(ReservedSeat obj, Screen3 scr) { if (ModelState.IsValid) { /*obj.Name = data["customerName"].ToString(); * obj.Surname = data["customerSurname"].ToString(); * obj.Time = data["movieTime"].ToString(); */ string numOfSeat = obj.ReservedSeats; string[] arraySeat = numOfSeat.Split(','); for (int i = 0; i < arraySeat.Length; i++) { string sn = arraySeat[i]; db.Screen3.Where( a => a.SeatNumber == sn ).Single().isReserved = true; } db.ReservedSeats.Add(obj); db.SaveChanges(); return(RedirectToAction("Reservation")); } else { ModelState.Clear(); ViewBag.Error = "Something went wrong. Try again or contact with Administrator."; return(RedirectToAction("Reservation", obj)); } }
private void button3_Click(object sender, EventArgs e) { this.Hide(); Screen3 s3 = new Screen3(u_id); s3.Show(); }
private void Update() { switch (currentUI) { case 3: Screen3.SetActive(true); Screen2.SetActive(false); Screen1.SetActive(false); break; case 2: Screen3.SetActive(false); Screen2.SetActive(true); Screen1.SetActive(false); break; case 1: Screen3.SetActive(false); Screen2.SetActive(false); Screen1.SetActive(true); break; default: Debug.Log("UI out of range"); break; } }
private void button1_Click(object sender, EventArgs e) { string no = v_no.Text; string name = v_name.Text; //string user_id = u_id; string model = v_model.Text; string type = v_type.selectedValue; // combobox string colour = u_colour.Text; string LicenseIssuDate = v_LIssuDate.Value.ToString("yyyy-MM-dd"); string LicenseNo = vL_no.Text; string LicenseExpiryDate = L_expiryDate.Value.ToString("yyyy-MM-dd"); SqlConnection con = new SqlConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["WheelsOnCharge"].ConnectionString; con.Open(); SqlDataAdapter adapter = new SqlDataAdapter("select CNIC from tbl_user where Email ='" + u_id + "'", con); DataTable dt = new DataTable(); adapter.Fill(dt); string user_id = dt.Rows[0][0].ToString(); if (no != null && name != null && user_id != null && model != null && type != null && colour != null && LicenseNo != null && LicenseIssuDate != null && LicenseExpiryDate != null) { try { SqlCommand cmd = new SqlCommand("sp_VehicleDails", con); cmd.CommandType = CommandType.StoredProcedure; //calling stored Procedures cmd.Parameters.Add("@u_id", SqlDbType.NVarChar).Value = user_id; cmd.Parameters.Add("@v_no", SqlDbType.NVarChar).Value = no; cmd.Parameters.Add("@v_name", SqlDbType.NVarChar).Value = name; cmd.Parameters.Add("@v_model", SqlDbType.NVarChar).Value = model; cmd.Parameters.Add("@v_colour", SqlDbType.NVarChar).Value = colour; cmd.Parameters.Add("@v_type", SqlDbType.NVarChar).Value = type; cmd.Parameters.Add("@License_no", SqlDbType.NVarChar).Value = LicenseNo; cmd.Parameters.Add("@License_DOI", SqlDbType.NVarChar).Value = LicenseIssuDate; cmd.Parameters.Add("@License_DOE", SqlDbType.NVarChar).Value = LicenseExpiryDate; cmd.ExecuteNonQuery(); con.Close(); con.Dispose(); MessageBox.Show("Vehicle added Sccessfully!!!", "Logs", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); Screen3 s3 = new Screen3(u_id); s3.Show(); } catch { MessageBox.Show("Error was encountered while adding vehicle! contact Database Admin!", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); } } else { MessageBox.Show("Some Fields are empty", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); } }
public void Navigate_root() { var s1 = new Screen1(); var s2 = new Screen2(); var s3 = new Screen3(); navigator.NavigateRoot(s1); navigator.Navigate(s2); navigator.NavigateRoot(s3); Assert.AreEqual(shell.ActiveItem, s3); }
private void button1_Click(object sender, EventArgs e) { string Date = dateTimePicker1.Value.ToString("yyyy-MM-dd"); string serviced_part = comboBox1.selectedValue; SqlConnection con = new SqlConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["WheelsOnCharge"].ConnectionString; con.Open(); SqlDataAdapter adapter = new SqlDataAdapter("select CNIC from tbl_user where Email ='" + u_id + "'", con); DataTable dt = new DataTable(); adapter.Fill(dt); string user_id = dt.Rows[0][0].ToString(); try { SqlCommand cmd = new SqlCommand("sp_maintenance", con); cmd.CommandType = CommandType.StoredProcedure; //calling stored Procedures cmd.Parameters.Add("@userid", SqlDbType.NVarChar).Value = user_id; cmd.Parameters.Add("@vehicleno", SqlDbType.NVarChar).Value = v_id; cmd.Parameters.Add("@date", SqlDbType.NVarChar).Value = Date; cmd.Parameters.Add("@hmmmm", SqlDbType.NVarChar).Value = "[" + serviced_part + "]"; cmd.ExecuteNonQuery(); con.Close(); con.Dispose(); MessageBox.Show("Log Entered Sccessfully!!!", "Logs", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); Screen3 s3 = new Screen3(u_id); s3.Show(); } catch { MessageBox.Show("Error in entering logs", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { user_email = login_email.Text; string pass = login_password.Text; SqlConnection con = new SqlConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["WheelsOnCharge"].ConnectionString; SqlDataAdapter adapter = new SqlDataAdapter("select count(*) from tbl_user where email ='" + user_email + "' and password ='******'", con); DataTable dt = new DataTable(); adapter.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { MessageBox.Show("Welcome!!!", "login Sucessful", MessageBoxButtons.OK, MessageBoxIcon.Information); Screen3 f3 = new Screen3(user_email); this.Hide(); f3.Show(); } else { MessageBox.Show("Username or Password is Incorrect!!!", "Login Failed", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); } con.Close(); }
private void Show_Click(object sender, RoutedEventArgs e) { Screen3.Show(); }
private void Hide_Click(object sender, RoutedEventArgs e) { var test = this.dockingManager; Screen3.Hide(); }
private void PreviousUI() { Screen1.Previous(); Screen2.Previous(); Screen3.Previous(); }
private void NextUI() { Screen1.Next(); Screen2.Next(); Screen3.Next(); }