Exemple #1
0
        public void LoadFullList()
        {
            ep.SetError(dataGridView1, "");
            try
            {
                dataGridView1.AutoGenerateColumns = false;
                DataBase db;
                if (rdStudents.Checked)
                {
                    db = new StudenData();
                }
                else
                {
                    db = new StaffData();
                }

                _fullPersonList          = db.GetList();
                _bs.DataSource           = _fullPersonList;
                dataGridView1.DataSource = _bs.DataSource;

                if (Application.OpenForms["MDIMainForm"] as MDIMainForm != null)
                {
                    MDIMainForm mfrm = Application.OpenForms["MDIMainForm"] as MDIMainForm;
                }
                lblJobCount.Text = "Student Count - " + dataGridView1.Rows.Count.ToString();
            }
            catch (Exception ex)
            {
                ep.SetError(dataGridView1, ex.Message);
            }
        }
        static void Main()
        {
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new LoginForm());
            try
            {
                //Form2 frm = new Form2();
                //frm.ShowDialog();
                LoginForm loginForm = new LoginForm();
                if (loginForm.ShowDialog() == DialogResult.OK)
                {
                    Application.EnableVisualStyles();
                    MDIMainForm mainForm = new MDIMainForm();
                    mainForm.CurrentUser = loginForm.CurrentUser;
                    Application.Run(mainForm);
                }

                else
                {
                    Application.Exit();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #3
0
        // private SqlGeneratorBase sqlBase;

        public RollCallSearch(MDIMainForm mdiForm)
        {
            InitializeComponent();
            _bs      = new BindingSource();
            _mdiForm = mdiForm;
            rcd      = new ResidentRollCallData();
        }
Exemple #4
0
        private void JobSearch_Load(object sender, EventArgs e)
        {
            //label4.Text = CommonVariables.GetConnectionString();
            LoadFullList();
            SetDataSource();

            if (Application.OpenForms["MDIMainForm"] as MDIMainForm != null)
            {
                MDIMainForm mfrm = Application.OpenForms["MDIMainForm"] as MDIMainForm;
            }

            //chkMyJobsOnly.Checked = currentUser.ApplyMyJobsOnly;
            //chkMyJobsOnly.Enabled = currentUser.ApplyMyJobsOnly;



            //chkMyJobsOnly.Checked = currentUser.Jsc.IsLastSearchedJobsOnlyMine; // ApplyMyJobsOnly;
            // chkMyJobsOnly.Enabled = currentUser.ApplyMyJobsOnly;
            //    lastSortColumnName =currentUser.Jsc.SortColumnName;
            //    lastSortOrder = currentUser.Jsc.SortOrder;
            //  txtCustomer.Text = currentUser.Jsc.CustomerName;
            //  txtPrismNo.Text = currentUser.Jsc.PrismNo;

            //if (currentUser.Jsc.IsLastSearchedJobStatusCurrent)
            //    rdCurrent.Checked = true;
            //else
            //    rdCompleted.Checked = true;

            //
            //this.chkMyJobsOnly.CheckedChanged += new System.EventHandler(this.chkMyJobsCheckedChanged);
        }
Exemple #5
0
        static void Main()
        {
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new LoginForm());
            try
            {
                //Form2 frm = new Form2();
                //frm.ShowDialog();
                //string licensKey = Encryption.Encrypt("Ranfurly Care Centre_31/12/2020");
                LoginForm loginForm = new LoginForm();
                //LoginFormTest loginForm = new LoginFormTest();
                if (loginForm.ShowDialog() == DialogResult.OK)
                {
                    Application.EnableVisualStyles();
                    MDIMainForm mainForm = new MDIMainForm(loginForm.Jarvis);
                    Application.Run(mainForm);
                    //Application.Run(new Form1());
                }

                else
                {
                    Application.Exit();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #6
0
        //JobSearchCriteria originalJsc;

        public StaffSearch(MDIMainForm mdiForm)
        {
            InitializeComponent();
            _bs      = new BindingSource();
            _mdiForm = mdiForm;
            //currentUser = user;
            //originalJsc = user.Jsc;
        }
Exemple #7
0
 public StudentAdd(MDIMainForm mdiform)
 {
     InitializeComponent();
     _mdiForm = mdiform;
     _student = new Student();
     _address = new Address();
     _student.Addresses.Add(_address);
 }
Exemple #8
0
 public IncidentSearch(MDIMainForm mdiForm)
 {
     InitializeComponent();
     _bs                     = new BindingSource();
     _mdiForm                = mdiForm;
     _incidentType           = Incident.IncidentTypeEnum.All;
     _lastSortedPropertyName = "IncidentDate";
 }
        private void JobSearch_Load(object sender, EventArgs e)
        {
            //FormInitialiserBase fi = new GenericFormIntialiser(this);
            LoadFullList();
            SetDataSource();

            if (Application.OpenForms["MDIMainForm"] as MDIMainForm != null)
            {
                MDIMainForm mfrm = Application.OpenForms["MDIMainForm"] as MDIMainForm;
            }
        }
Exemple #10
0
        private void JobSearch_Load(object sender, EventArgs e)
        {
            //FormInitialiserBase fi = new GenericFormIntialiser(this);
            SetComboBoxDefaults();
            LoadRollCallList();
            //SetDataSource();
            cmbLocation.SelectedIndexChanged -= cmbLocation_SelectedIndexChanged;
            PopulateLocationCombobox();


            if (Application.OpenForms["MDIMainForm"] as MDIMainForm != null)
            {
                MDIMainForm mfrm = Application.OpenForms["MDIMainForm"] as MDIMainForm;
            }
        }
Exemple #11
0
        private void JobSearch_Load(object sender, EventArgs e)
        {
            FormInitialiserBase fi = new GenericFormIntialiser(this);

            sqlBase = new AllCurrentStudents(cmbLocation);
            LoadStudentList();
            SetDataSource();
            cmbLocation.SelectedIndexChanged -= cmbLocation_SelectedIndexChanged;
            PopulateLocationCombobox();

            if (Application.OpenForms["MDIMainForm"] as MDIMainForm != null)
            {
                MDIMainForm mfrm = Application.OpenForms["MDIMainForm"] as MDIMainForm;
            }
        }
Exemple #12
0
 public ResidentRollCallYearlySummaryByResident(List <ResidentRollCall> residentCalls, MDIMainForm mdiForm)
 {
     InitializeComponent();
     _residentCalls = residentCalls;
     _mdiForm       = mdiForm;
 }
Exemple #13
0
 public ProfessionalServicesSearch(MDIMainForm mdiForm)
 {
     InitializeComponent();
     _bs      = new BindingSource();
     _mdiForm = mdiForm;
 }
        //private SqlGeneratorBase sqlBase;

        public AppointmentSearch(MDIMainForm mdiForm)
        {
            InitializeComponent();
            _studentBs = new BindingSource();
            _mdiForm   = mdiForm;
        }
Exemple #15
0
 public StaffSearchNew(MDIMainForm mdiForm)
 {
     InitializeComponent();
     _bs      = new BindingSource();
     _mdiForm = mdiForm;
 }