Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            SA46Team07BEntities context = new SA46Team07BEntities();
            string user = tbUsername.Text;
            string pwd  = tbPassword.Text;
            var    qry  = (from x in context.Logins select x.UserID).First();
            var    qry1 = (from x in context.Logins select x.Password).First();

            if ((qry == user) && (qry1 == pwd))
            {
                attempt = 0;
                Form1 f = new Form1();
                f.Show();
                this.Hide();
            }
            else if ((attempt <= 3) && (attempt > 0))
            {
                MessageBox.Show("Invalid credentials......You Have Only " + Convert.ToString(attempt) + " Attempt Left To Try");
                --attempt;

                //  MessageBox.Show("Invalid credentials....Please re-enter your userid and password");
            }
            else
            {
                MessageBox.Show("you are not granted with access");

                this.Close();
            }
        }
Exemple #2
0
        private void report_Load(object sender, EventArgs e)
        {
            SA46Team07BEntities ctx            = new SA46Team07BEntities();
            CrystalReport2      crystalReport2 = new CrystalReport2();

            crystalReport2.SetDataSource(ctx.Bookings);
            crystalReportViewer1.ReportSource = crystalReport2;
        }
Exemple #3
0
        public MemberList()
        {
            InitializeComponent();
            SA46Team07BEntities  context = new SA46Team07BEntities();
            CrystalReportMembers cr      = new CrystalReportMembers();

            cr.SetDataSource(context.Members);
            crystalReportViewer1.ReportSource = cr;
        }
Exemple #4
0
        public OccupancyReport()
        {
            InitializeComponent();
            SA46Team07BEntities context = new SA46Team07BEntities();

            Sandy.CrystalReportOccup cr = new Sandy.CrystalReportOccup();
            cr.SetDataSource(context.Occupancies);
            crystalReportViewer1.ReportSource = cr;
        }
Exemple #5
0
        public BookingReceipt()
        {
            InitializeComponent();
            SA46Team07BEntities         context = new SA46Team07BEntities();
            CrystalReportBookingReceipt cr      = new CrystalReportBookingReceipt();

            cr.SetDataSource(context.BookingViews);
            crystalReportViewer1.ReportSource  = cr;
            crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
        }