void Reset() { E = true; StopCoroutine("ChangeCoreColor"); ChangeColor(SwitchColor); SC1.SendMessage("Reset"); SC2.SendMessage("Reset"); }
private void Button4_Click(System.Object sender, System.EventArgs e) { DGV.Rows.Clear(); SeatCapacity.Clear(); BookingNo.Clear(); SC2.Clear(); SeatAvailability.Clear(); RadioButton1.Checked = false; RadioButton2.Checked = false; RNo.Text = "Select"; BusSerialNo.Text = "Select"; }
public void btnclear_Click(System.Object sender, System.EventArgs e) { Rno.Text = "Select"; cmbstartpoint.Text = ""; cmbdestination.Text = ""; BusSerialNo.Text = "Select"; BusNumber.Text = "Select"; BusType.Text = "Select"; BusReservation.Text = "Select"; Arrivaltime.Value = Convert.ToDateTime(DateTime.Now); Departuretime.Value = Convert.ToDateTime(DateTime.Now); SeatCapacity.Clear(); S1.Clear(); S2.Clear(); SeatAvailability.Clear(); SC2.Clear(); }
static void Main(string[] args) { int i = 123; string s = "Some string"; object o = s; //try //{ // i = (int)o; //} //finally //{ // Console.Write($"i = {i}"); //} SC2 c1 = new SC2(); Console.WriteLine(c1.C2(3)); VC1 vc1 = new VC1(); VC1.VC2 aa = new VC1.VC2(); Console.WriteLine(vc1.Vc2()); Console.WriteLine(aa); VC1 vc2 = new VC1(new SC2()); }
void Playing() { SC1.SendMessage("Playing"); SC2.SendMessage("Playing"); }
private void Button3_Click(System.Object sender, System.EventArgs e) { //Try DialogResult res = MessageBox.Show("Do U Want To Cancel Waiting Booking?", "Cancel Booking?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (res == DialogResult.Yes) { if (string.IsNullOrEmpty(BookingNo.Text.Trim())) { MessageBox.Show("Give Booking No.."); } else { string CN2 = null; con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Bus_System;Integrated Security=True"); con.Open(); cmd = new SqlCommand("Select max(CancellationNo) From Cancellation", con); dr = cmd.ExecuteReader(); dr.Read(); if ((!object.ReferenceEquals(dr[0], DBNull.Value))) { t = Convert.ToInt32(dr[0]) + 1; } else { t = 1; } CN2 = t.ToString(); dr.Close(); cmd = new SqlCommand("Select * From APaymentPassenger Where BookingNo=" + BookingNo.Text + "", con); dr = cmd.ExecuteReader(); dr.Read(); string a1 = null; string a2 = null; string a3 = null; string a4 = null; string a5 = null; string a6 = null; string a7 = null; a1 = dr.GetValue(0).ToString(); a2 = dr.GetValue(1).ToString(); a3 = dr.GetValue(2).ToString(); a4 = dr.GetValue(6).ToString(); a5 = dr.GetValue(7).ToString(); a6 = dr.GetValue(8).ToString(); a7 = dr.GetValue(9).ToString(); dr.Close(); cmd = new SqlCommand("Insert Into Cancellation Values(" + CN2 + ",'" + a1 + "','" + a2 + "','" + a3 + "','" + DateAndTime.Today + " " + DateAndTime.TimeOfDay + "','" + a4 + "','" + a5 + "','" + a6 + "','" + a7 + "','" + Strings.Format(Arrivaltime.Value, "hh:MM:ss tt") + "')", con); cmd.ExecuteNonQuery(); cmd = new SqlCommand("Delete From APassengerDetails Where BookingNo=" + BookingNo.Text + "", con); cmd.ExecuteNonQuery(); cmd = new SqlCommand("Delete From APaymentPassenger Where BookingNo=" + BookingNo.Text + "", con); cmd.ExecuteNonQuery(); MessageBox.Show("Done"); con.Close(); DGV.Rows.Clear(); SeatCapacity.Clear(); BookingNo.Clear(); SC2.Clear(); SeatAvailability.Clear(); RadioButton1.Checked = false; RadioButton2.Checked = false; } } else { MessageBox.Show("Not Cancelled"); } //Catch ex As Exception // MsgBox("Nothing Selected..!") //End Try }
public VC1(SC2 sss) { // 添加 , 侦听时间发生 sss.Event1 += Faxmsg; }