예제 #1
0
        private void BookingActivityusercontrol_Load(object sender, EventArgs e)
        {
            ctx = Program.ctx;
            var flist = ctx?.Facilities?.Select(x => x.Activity)?.Distinct()?.ToList();

            Activity_comboBox1.DataSource    = flist;
            Activity_comboBox1.DisplayMember = "Activity";
            dateTimePicker1.MinDate          = DateTime.Today.AddDays(1);
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ctx = new SA46Team10aESNETProjectEntities();
            Application.ApplicationExit += (sender, e) => ctx?.Dispose();
            Application.Run(new Homepage());
        }
 private void Form3_Load(object sender, EventArgs e)
 {
     ctx   = Program.ctx;
     bookf = ctx.Facilities.Where(x => x.Activity == bookact &&
                                  x.Venue == bookven).First();
     timeslots = (from x in ctx.Timings
                  orderby x.TimeSlot
                  select x).ToList();
     FormBuilding();
 }
예제 #4
0
        private void AddMemberform_Load(object sender, EventArgs e)
        {
            ctx = Program.ctx;
            m   = new Member();
            int x, y;

            x               = Screen.PrimaryScreen.WorkingArea.Width / 3;
            y               = Screen.PrimaryScreen.WorkingArea.Height * 2 / 9;
            Location        = new Point(x, y);
            tbPh1.MaxLength = 4;
            tbPh2.MaxLength = 4;
            rbtnM.Checked   = true;
        }
        private void EditFacilityForm_Load(object sender, EventArgs e)
        {
            ctx = Program.ctx;
            int x, y;

            x                    = Screen.PrimaryScreen.WorkingArea.Width / 3;
            y                    = Screen.PrimaryScreen.WorkingArea.Height * 2 / 9;
            Location             = new Point(x, y);
            lblFacID.Text        = f.FacilityID;
            textBox2.Text        = f.Activity;
            textBox3.Text        = f.Venue;
            numericUpDown1.Value = (decimal)f.MaxCount;
        }
예제 #6
0
 private void CancelBookingUserControl_Load(object sender, EventArgs e)
 {
     ctx = Program.ctx;
     if (ctx != null)
     {
         mlist = ctx.Bookings.Where(x => x.bookstatus == "active")
                 .Select(x => x.Member).Distinct().ToList();
         foreach (Member mem in mlist)
         {
             comboBox1.Items.Add(
                 String.Format("{0} ( ID - {1} )", mem.MemberName, mem.memberID)
                 );
         }
     }
 }
        private void MemberList_Load(object sender, EventArgs e)
        {
            ctx   = Program.ctx;
            mlist = ctx?.Members?.ToList();
            dataGridView1.DataSource = mlist;
            var lastCol = dataGridView1?.Columns?.GetLastColumn(
                DataGridViewElementStates.Visible,
                DataGridViewElementStates.None
                );

            if (lastCol != null)
            {
                lastCol.Visible = false;
            }
        }
예제 #8
0
        private void FacilitiesUserControl_Load(object sender, EventArgs e)
        {
            ctx   = Program.ctx;
            flist = ctx?.Facilities?.ToList();
            gridFacility.DataSource = flist;
            gridFacility.ForeColor  = Color.Black;
            var lastCol = gridFacility?.Columns?.GetLastColumn(
                DataGridViewElementStates.Visible,
                DataGridViewElementStates.None
                );

            if (lastCol != null)
            {
                lastCol.Visible = false;
            }
            gridFacility.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
        }
 public EditMember()
 {
     InitializeComponent();
     ctx = Program.ctx;
 }
예제 #10
0
 private void AddFacilityForm_Load(object sender, EventArgs e)
 {
     ctx = Program.ctx;
 }