Beispiel #1
0
        }//------------------------

        //this procedure will update User Information
        public void UpdateSystemUserInfo(CommonExchange.SysAccess userInfo, CommonExchange.SysAccess editUserInfo)
        {
            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                remClient.UpdateSystemUserInfo(userInfo, editUserInfo);
            }

            Int32 index = 0;

            foreach (DataRow userRow in _userInformationTable.Rows)
            {
                if (String.Equals(editUserInfo.UserId, RemoteServerLib.ProcStatic.DataRowConvert(userRow, "system_user_id", "")))
                {
                    DataRow editRow = _userInformationTable.Rows[index];

                    editRow.BeginEdit();

                    editRow["system_user_id"]   = editUserInfo.UserId;
                    editRow["system_user_name"] = editUserInfo.UserName;
                    editRow["last_name"]        = editUserInfo.PersonInfo.LastName;
                    editRow["first_name"]       = editUserInfo.PersonInfo.FirstName;
                    editRow["middle_name"]      = editUserInfo.PersonInfo.MiddleName;

                    editRow.EndEdit();
                }

                index++;
            }
        }//------------------------
Beispiel #2
0
        }//---------------------

        //this function will get search taransaction log
        public DataTable GetSearchTransactionLog(CommonExchange.SysAccess userInfo, String queryString, String userId, String dateStart, String dateEnd)
        {
            DataTable newTable = new DataTable("UserInformationTable");

            newTable.Columns.Add("transaction_id", System.Type.GetType("System.String"));
            newTable.Columns.Add("transaction_date_string", System.Type.GetType("System.String"));
            newTable.Columns.Add("user_name", System.Type.GetType("System.String"));
            newTable.Columns.Add("access_description", System.Type.GetType("System.String"));
            newTable.Columns.Add("transaction_done", System.Type.GetType("System.String"));

            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                _transactionLogTable = remClient.SelectTransactionLog(userInfo, queryString, userId, dateStart, dateEnd);
            }

            foreach (DataRow logRow in _transactionLogTable.Rows)
            {
                DataRow newRow = newTable.NewRow();

                newRow["transaction_id"]          = RemoteServerLib.ProcStatic.DataRowConvert(logRow, "transaction_id", "");
                newRow["transaction_date_string"] = RemoteServerLib.ProcStatic.DataRowConvert(logRow, "transaction_date_string", "");
                newRow["user_name"]          = RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(logRow, "last_name", "first_name", "middle_name");
                newRow["access_description"] = RemoteServerLib.ProcStatic.DataRowConvert(logRow, "access_description", "");
                newRow["transaction_done"]   = RemoteServerLib.ProcStatic.DataRowConvert(logRow, "transaction_done", "");

                newTable.Rows.Add(newRow);
            }

            return(newTable);
        }//-----------------------
Beispiel #3
0
        }//----------------------

        //this function determines if the user name and password already exist
        public Boolean IsExistsNameSystemUserInformation(CommonExchange.SysAccess userInfo, CommonExchange.SysAccess newUserInfo)
        {
            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                return(remClient.IsExistsNameSystemUserInformation(userInfo, newUserInfo));
            }
        }//------------------
Beispiel #4
0
        }//------------------------------

        //this procedure will select user information
        public void SelectUserInformation(CommonExchange.SysAccess userInfo, String queryString)
        {
            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                _userInformationTable = remClient.SelectSystemUserInfo(userInfo, queryString);
            }
        }//--------------------------
Beispiel #5
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    //sets the user information
                    CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    //--------------------------

                    //Int32 userAccess = 1;

                    //if (userAccess == 1)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}

                    Boolean isExpired = false;

                    if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    {
                        userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                        //Int32 process = 1;

                        //if (process == 1)
                        //{
                        //    Application.Run(new ChartOfAccountManager(userInfo));
                        //}
                    }
                }//-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
            }
            finally
            {
                Application.Exit();
            }
        }
Beispiel #6
0
        //this procedure will initialize the class
        private void InitializeClass(CommonExchange.SysAccess userInfo)
        {
            //get the server date and time
            using (RemoteClient.RemCntBaseManager remClient = new RemoteClient.RemCntBaseManager())
            {
                _serverDateTime = remClient.GetServerDateTime(userInfo);
            }//---------------------

            //the the dataset administrator manager
            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                _classDataSet = remClient.GetDataSetForAdministrator(userInfo);
            } //------------------
        }     //-------------------------
Beispiel #7
0
        }//-----------------------

        //this fucntion will get details User Information
        public CommonExchange.SysAccess GetDetailsUserInformation(CommonExchange.SysAccess userInfo, String userSysId, String startUp)
        {
            CommonExchange.SysAccess newUserInfo = new CommonExchange.SysAccess();

            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                newUserInfo = remClient.SelectBySystemUserIDSystemUserInfo(userInfo, userSysId);
            }

            newUserInfo.PersonInfo.FilePath = base.GetPersonImagePath(userInfo, newUserInfo.PersonInfo.PersonSysId,
                                                                      newUserInfo.PersonInfo.PersonImagesFolder(startUp));

            return(newUserInfo);
        }//------------------------
Beispiel #8
0
        }     //-------------------------

        //this procedure will insert new User Information
        public void InsertSystemUserInfo(CommonExchange.SysAccess userInfo, CommonExchange.SysAccess newUserInfo)
        {
            using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
            {
                remClient.InsertSystemUserInfo(userInfo, ref newUserInfo);
            }

            DataRow newRow = _userInformationTable.NewRow();

            newRow["system_user_id"]     = newUserInfo.UserId;
            newRow["system_user_name"]   = newUserInfo.UserName;
            newRow["system_user_status"] = newUserInfo.UserStatus;
            newRow["last_name"]          = newUserInfo.PersonInfo.LastName;
            newRow["first_name"]         = newUserInfo.PersonInfo.FirstName;
            newRow["middle_name"]        = newUserInfo.PersonInfo.MiddleName;

            _userInformationTable.Rows.Add(newRow);
        }//------------------------
Beispiel #9
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    //sets the user information
                    CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    //--------------------------

                    //userInfo.UserName = "******";
                    //userInfo.Password = "******";

                    Boolean isExpired = false;

                    if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    {
                        userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                        //Int32 process = 3;

                        //if (process == 1)
                        //{
                        //    //EmployeeLogic empManager = new EmployeeLogic(userInfo);

                        //    //Application.Run(new EmployeeCreate(userInfo, empManager));
                        //}
                        //else if (process == 2)
                        //{
                        //    //EmployeeLogic empManager = new EmployeeLogic(userInfo);

                        //    //Application.Run(new EmployeeUpdate(userInfo, empManager, "44444"));
                        //}
                        //else if (process == 3)
                        //{
                        //    Application.Run(new EmployeeManager(userInfo));
                        //}
                        //else if (process == 4)
                        //{
                        //    DeductionLogic decManager = new DeductionLogic(userInfo);

                        //    //CommonExchange.DeductionInformation deductionInfo = new CommonExchange.DeductionInformation();

                        //    //deductionInfo.SystemId = "SYSDEC002";
                        //    //deductionInfo.Description = "Mortuary Aids";

                        //    ////decManager.InsertDeductionInformation(userInfo, deductionInfo);
                        //    //decManager.UpdateDeductionInformation(userInfo, deductionInfo);

                        //    //MessageBox.Show("Success");

                        //    Application.Run(new DeductionCreate(userInfo, decManager));
                        //}
                        //else if (process == 5)
                        //{
                        //    DeductionLogic decManager = new DeductionLogic(userInfo);

                        //    Application.Run(new DeductionUpdate(userInfo, decManager, "SYSDEC001"));
                        //}
                        //else if (process == 6)
                        //{
                        //    Application.Run(new DeductionManager(userInfo));
                        //}
                        //else if (process == 7)
                        //{
                        //    CommonExchange.DeductionInformation decInfo = new CommonExchange.DeductionInformation();

                        //    decInfo.DeductionSysId = "SYSDEC001";
                        //    decInfo.Description = "Union Dues";

                        //    DeductionLogic decManager = new DeductionLogic(userInfo);

                        //    Application.Run(new ApplyDeduction(userInfo, decInfo, decManager));
                        //}
                        //else if (process == 8)
                        //{
                        //    Application.Run(new TempNavigator(userInfo));
                        //}
                        //else if (process == 9)
                        //{
                        //    DeductionLogic decManager = new DeductionLogic(userInfo);
                        //    CommonExchange.Employee empInfo = new CommonExchange.Employee();
                        //    empInfo.EmployeeSysId = "SYSEMP001";
                        //    empInfo.EmployeeId = "M234234";
                        //    empInfo.PersonInfo.LastName = "Agan";
                        //    empInfo.PersonInfo.FirstName = "Judyll Mark";
                        //    empInfo.PersonInfo.MiddleName = "Tinguha";

                        //    Application.Run(new EmployeeDeductionSummary(userInfo, empInfo, decManager));
                        //    //Application.Run(new EarningManager());
                        //}
                        //else if (process == 10)
                        //{
                        //    Application.Run(new EarningManager(userInfo));
                        //}
                        //else if (process == 11)
                        //{
                        //    LoanRemittanceLogic loanManager = new LoanRemittanceLogic(userInfo);

                        //    Application.Run(new LoanTypeCreate(userInfo, loanManager));
                        //}
                        //else if (process == 12)
                        //{
                        //    LoanRemittanceLogic loanManager = new LoanRemittanceLogic(userInfo);

                        //    Application.Run(new LoanTypeUpdate(userInfo, loanManager, "SYSLON001"));
                        //}
                        //else if (process == 13)
                        //{
                        //    Application.Run(new LoanRemittanceManager(userInfo));
                        //}
                        //else if (process == 14)
                        //{
                        //    LoanRemittanceLogic loanManager = new LoanRemittanceLogic(userInfo);
                        //    CommonExchange.Employee empInfo = new CommonExchange.Employee();
                        //    empInfo.EmployeeSysId = "SYSEMP001";
                        //    empInfo.EmployeeId = "M234234";
                        //    empInfo.PersonInfo.LastName = "Agan";
                        //    empInfo.PersonInfo.FirstName = "Judyll Mark";
                        //    empInfo.PersonInfo.MiddleName = "Tinguha";

                        //    Application.Run(new LoanRemittanceSummary(userInfo, empInfo, loanManager));
                        //}
                    }
                } //-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "Error");
            }
            finally
            {
                Application.Exit();
            }
        }
Beispiel #10
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    //sets the user information
                    CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    //--------------------------

                    //Int32 userAccess = 1;

                    //if (userAccess == 1)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}
                    //else if (userAccess == 2)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}
                    //else if (userAccess == 3)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}

                    //Boolean isExpired = false;

                    //if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    //{
                    //    userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                    //    Int32 process = 8;

                    //    if (process == 1)
                    //    {
                    //        SubjectSchedulingLogic scheduleManager = new SubjectSchedulingLogic(userInfo);

                    //        Application.Run(new SubjectSchedule(userInfo, scheduleManager));
                    //    }
                    //    else if (process == 2)
                    //    {
                    //        //SubjectSchedulingLogic scheduleManager = new SubjectSchedulingLogic(userInfo);

                    //        //Application.Run(new SubjectScheduleCreate(userInfo, scheduleManager));
                    //    }
                    //    else if (process == 3)
                    //    {
                    //        SubjectSchedulingLogic scheduleManager = new SubjectSchedulingLogic(userInfo);
                    //        //scheduleManager.SelectByDateStartEndScheduleInformationDetails(userInfo, "01/01/2008", "12/01/2008", false);

                    //        //Application.Run(new SubjectScheduleUpdate(userInfo, scheduleManager.GetDetailsScheduleInformation("SYSSCH000000001"),
                    //        //    scheduleManager));
                    //    }
                    //    else if (process == 4)
                    //    {
                    //        Application.Run(new SubjectSchedulingManager(userInfo));
                    //    }
                    //    else if (process == 5)
                    //    {
                    //        try
                    //        {
                    //            Application.Run(new TeacherLoadingManager(userInfo));
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Teacher Loading Manager");
                    //        }
                    //    }
                    //    else if (process == 6)
                    //    {
                    //        try
                    //        {
                    //            Application.Run(new AuxiliaryInformationManager(userInfo));
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Auxiliary Service Information Manager");
                    //        }
                    //    }
                    //    else if (process == 7)
                    //    {
                    //        try
                    //        {
                    //            Application.Run(new AuxiliarySchedulingManager(userInfo));
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Auxiliary Service Information Manager");
                    //        }
                    //    }
                    //    else if (process == 8)
                    //    {
                    //        try
                    //        {
                    //            Application.Run(new StudentLoadingManager(userInfo));
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            RemoteClient.ProcStatic.ShowErrorDialog("Error Loading Student Loading Manager\n\n" + ex.Message, "Error Loading");
                    //        }
                    //    }
                    //    else if (process == 9)
                    //    {
                    //        try
                    //        {
                    //            Application.Run(new ScholarshipManager(userInfo));
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            RemoteClient.ProcStatic.ShowErrorDialog("Error Loading Scholarship Manager\n\n" + ex.Message, "Error Loading");
                    //        }
                    //    }
                    //}
                }//-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
            }
            finally
            {
                Application.Exit();
            }
        }
Beispiel #11
0
        static void Main()
        {
            //Looking for running instance
            Process runningInstance = ProcessInstance.GetRunningInstance();

            if (runningInstance != null)
            {
                RemoteClient.ProcStatic.ShowErrorDialog("University Management System is already running.", "Error");
            }
            else
            {
                //sets the user information
                CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                //--------------------------

                try
                {
                    //registers the tcp channel
                    TcpChannel channel = new TcpChannel();
                    ChannelServices.RegisterChannel(channel, false);
                    //--------------------------

                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);

                    Int32 startIndex = 1;

                    if (startIndex == 1)
                    {
                        Boolean hasAccess = false;

                        using (SystemLogIn frmLogIn = new SystemLogIn())
                        {
                            frmLogIn.ShowDialog();

                            if (frmLogIn.HasAccess)
                            {
                                hasAccess = true;
                                userInfo  = frmLogIn.UserInformation;
                            }
                        }

                        if (hasAccess)
                        {
                            Application.Run(new UmsManager(userInfo));
                        }
                    }
                    else if (startIndex == 2)
                    {
                        using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                        {
                            //userInfo.UserName = "******";
                            //userInfo.Password = "******";

                            Boolean isExpired = false;

                            if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                            {
                                userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                                Int32 process = 1;

                                if (process == 1)
                                {
                                    try
                                    {
                                        Application.Run(new UmsManager(userInfo));
                                    }
                                    catch (Exception ex)
                                    {
                                        RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception err)
                {
                    RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
                }
                finally
                {
                    Application.Exit();
                }
            }
        }
Beispiel #12
0
        } //--------------------

        //event is raised when the key is pressed
        private void txtPasswordKeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.pbxIcon.Image        = global::CampusAccessServices.Properties.Resources.loading2;
                this.lblAuthenticate.Text = "Authenticating user...";

                Application.DoEvents();

                _userInfo.Password = this.txtPassword.Text;

                _userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                try
                {
                    this.Cursor = Cursors.WaitCursor;

                    using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                    {
                        Boolean isExpired = false;

                        if (remClient.AuthenticateSystemUser(ref _userInfo, ref isExpired) && (RemoteServerLib.ProcStatic.IsSystemAccessAdmin(_userInfo) ||
                                                                                               RemoteServerLib.ProcStatic.IsSystemAccessGateKeepers(_userInfo)))
                        {
                            _hasAccess = true;

                            //_tmrLoading.Start();
                            this.Close();
                        }
                        else
                        {
                            this.pbxIcon.Image = global::CampusAccessServices.Properties.Resources.Symbol_Error;

                            if (!isExpired)
                            {
                                this.lblAuthenticate.Text = "ACCESS DENIED";
                            }
                            else
                            {
                                this.lblAuthenticate.Text = "Your Software License is already expired.";
                            }

                            this.lblAuthenticate.ForeColor = Color.Red;

                            _tmrLogIn.Start();

                            if (_tryCounter == 3)
                            {
                                _hasAccess = false;

                                this.Close();
                            }
                            else
                            {
                                _tryCounter++;
                            }
                        }
                    }
                }
                catch
                {
                    RemoteClient.ProcStatic.ShowErrorDialog("There has been a problem in the attempt to access the system.\n\nPlease contact your system administrator.", "System Error");
                }
                finally
                {
                    this.Cursor = Cursors.Arrow;
                }
            }
        } //--------------------------------
Beispiel #13
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    //sets the user information
                    CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    //--------------------------

                    Int32 userAccess = 1;

                    if (userAccess == 1)
                    {
                        userInfo.UserName = "******";
                        userInfo.Password = "******";
                    }

                    Boolean isExpired = false;

                    if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    {
                        userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                        Int32 process = 3;

                        if (process == 1)
                        {
                            try
                            {
                                CampusAccessLogic campusAccessManager = new CampusAccessLogic(userInfo);

                                Application.Run(new CampusAccessManager(userInfo, campusAccessManager, String.Empty));
                            }
                            catch (Exception ex)
                            {
                                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
                            }
                        }
                        else if (process == 2)
                        {
                            try
                            {
                                Application.Run(new AccessPointInformation(userInfo));
                            }
                            catch (Exception ex)
                            {
                                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
                            }
                        }
                        else if (process == 3)
                        {
                            Boolean hasAccess = false;

                            using (SystemLogIn frmLogIn = new SystemLogIn())
                            {
                                frmLogIn.ShowDialog();

                                if (frmLogIn.HasAccess)
                                {
                                    hasAccess = true;
                                    userInfo  = frmLogIn.UserInformation;
                                }
                            }

                            if (hasAccess)
                            {
                                Application.Run(new AccessPointInformation(userInfo));
                            }
                        }
                    }
                }//-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
            }
            finally
            {
                Application.Exit();
            }
        }
Beispiel #14
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    //sets the user information
                    CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    //--------------------------

                    //Int32 userAccess = 1;

                    //if (userAccess == 1)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}
                    //else if (userAccess == 2)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}

                    Boolean isExpired = false;

                    if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    {
                        userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                        //Int32 process = 1;

                        //if (process == 1)
                        //{
                        //    try
                        //    {
                        //        Application.Run(new PersonInformationWithRelationship(userInfo));
                        //    }
                        //    catch (Exception ex)
                        //    {
                        //        RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
                        //    }
                        //}
                        //else if (process == 2)
                        //{
                        //    try
                        //    {
                        //        //Application.Run(new PersonInformationCreateUpdate(userInfo));
                        //    }
                        //    catch (Exception ex)
                        //    {
                        //        RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
                        //    }
                        //}
                        //else if (process == 3)
                        //{
                        //    BaseServicesLogic baseServiceManager = new BaseServicesLogic(userInfo);

                        //    //Application.Run(new PersonRelationship(userInfo, baseServiceManager));
                        //}
                    }
                }//-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
            }
            finally
            {
                Application.Exit();
            }
        }
Beispiel #15
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    //sets the user information
                    CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    //--------------------------

                    Int32 userAccess = 2;

                    if (userAccess == 1)
                    {
                        userInfo.UserName = "******";
                        userInfo.Password = "******";
                    }
                    else if (userAccess == 2)
                    {
                        userInfo.UserName = "******";
                        userInfo.Password = "******";
                    }

                    Boolean isExpired = false;

                    if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    {
                        userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                        Int32 process = 7;

                        if (process == 1)
                        {
                            Application.Run(new StudentManager(userInfo));
                        }
                        else if (process == 2)
                        {
                            StudentLogic studentManager = new StudentLogic(userInfo);

                            //Application.Run(new FinanceServices.StudentGuidance(userInfo, studentManager));
                        }
                        else if (process == 3)
                        {
                            try
                            {
                                Application.Run(new FinanceServices.SchoolFeeManager(userInfo));
                            }
                            catch (Exception ex)
                            {
                                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading School Fee Manager");
                            }
                        }
                        else if (process == 5)
                        {
                            try
                            {
                                StudentLogic studentManager = new StudentLogic(userInfo);

                                Application.Run(new FinanceServices.StudentIdGenerator(userInfo, studentManager));
                            }
                            catch (Exception ex)
                            {
                                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
                            }
                        }
                        else if (process == 6)
                        {
                            //Application.Run(new StudentTab());
                        }
                        else if (process == 7)
                        {
                            Application.Run(new CashieringManager(userInfo));
                        }
                        else if (process == 8)
                        {
                            CashieringLogic casheiringManager = new CashieringLogic(userInfo);

                            Application.Run(new MultipleAdditionalFeeCreate(userInfo, casheiringManager));
                        }
                    }
                }//-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
            }
            finally
            {
                Application.Exit();
            }
        }
Beispiel #16
0
        static void Main()
        {
            try
            {
                //registers the tcp channel
                TcpChannel channel = new TcpChannel();
                ChannelServices.RegisterChannel(channel, false);
                //--------------------------

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //gets the user information
                using (RemoteClient.RemCntAdministratorManager remClient = new RemoteClient.RemCntAdministratorManager())
                {
                    ////sets the user information
                    //CommonExchange.SysAccess userInfo = new CommonExchange.SysAccess();
                    ////--------------------------

                    //Int32 userAccess = 1;

                    //if (userAccess == 1)
                    //{
                    //    userInfo.UserName = "******";
                    //    userInfo.Password = "******";
                    //}


                    //Boolean isExpired = false;

                    //if (remClient.AuthenticateSystemUser(ref userInfo, ref isExpired))
                    //{
                    //    userInfo.NetworkInformation = RemoteClient.ProcStatic.GetNetworkInformation();

                    //    Int32 process = 2;

                    //    if (process == 1)
                    //    {
                    //        Application.Run(new SchoolYearSemesterManager(userInfo));
                    //    }
                    //    else if (process == 2)
                    //    {
                    //        Application.Run(new CourseManager(userInfo));
                    //    }
                    //    else if (process == 3)
                    //    {
                    //        CourseLogic roomSubjectManager = new CourseLogic(userInfo);

                    //        Application.Run(new SubjectCreate(userInfo, roomSubjectManager));
                    //    }
                    //    else if (process == 4)
                    //    {
                    //        Application.Run(new TempNavigator(userInfo));
                    //    }
                    //    else if (process == 5)
                    //    {
                    //        SpecialClassLogic specialManager = new SpecialClassLogic(userInfo);

                    //        Application.Run(new SpecialClassCreate(userInfo, specialManager));
                    //    }
                    //    else if (process == 6)
                    //    {
                    //        Application.Run(new SpecialClassManager(userInfo));
                    //    }
                    //    else if (process == 7)
                    //    {
                    //        Application.Run(new MajorExamScheduleManager(userInfo));
                    //    }
                    //    else if (process == 8)
                    //    {
                    //        try
                    //        {
                    //            Application.Run(new TranscriptManager(userInfo));
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            RemoteClient.ProcStatic.ShowErrorDialog("Error Loading Transcript Manager\n\n" + ex.Message, "Error Loading");
                    //        }
                    //    }
                    //}
                } //-------------------------
            }
            catch (Exception err)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(err.Message, "System Error");
            }
            finally
            {
                Application.Exit();
            }
        }