예제 #1
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            //MessageBox.Show(cmbFacilites.SelectedValue.ToString());
            //MessageBox.Show(cmbCustName.SelectedValue.ToString());
            //MessageBox.Show(dtpIssueDate.Value.ToShortDateString());

            int      cusId    = Convert.ToInt32(cmbCustName.SelectedValue.ToString());
            string   facID    = cmbFacilites.SelectedValue.ToString();
            DateTime tempDate = Convert.ToDateTime(dtpIssueDate.Value.ToShortDateString());
            List <SA41Team_10B_SportsBookingFacility.BookingTranLayer> bt = new List <SA41Team_10B_SportsBookingFacility.BookingTranLayer>();

            bt = BookingController.GetSearchBookings(facID, cusId, tempDate);
            if (bt.Count > 1)
            {
                foreach (SA41Team_10B_SportsBookingFacility.BookingTranLayer b in bt)
                {
                    MessageBox.Show(b.CustomerID + b.FacilityId);
                    SA41Team10b_Form.BookingListForm frm = new SA41Team10b_Form.BookingListForm();
                    frm.Show();
                }
            }
            else if (bt.Count == 0)
            {
                MessageBox.Show("No Records");
            }
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     //finally
     //{
     SA41Team10b_Form.BookingListForm frm = new SA41Team10b_Form.BookingListForm();
     frm.Show();
     this.Close();
     //}
 }