Ejemplo n.º 1
0
 public Authenticate(CommonExchange.SysAccess userInfo)
 {
     if (!IsValidated(userInfo))
     {
         throw new Exception("Only authenticated users are allowed to access the system.");
     }
 }
Ejemplo n.º 2
0
        public SpecialClass(CommonExchange.SysAccess userInfo, SpecialClassLogic specialManager)
        {
            this.InitializeComponent();

            _userInfo       = userInfo;
            _specialManager = specialManager;

            _errProvider = new ErrorProvider();

            this.Load += new EventHandler(ClassLoad);
            this.cboYearSemester.SelectedIndexChanged += new EventHandler(cboYearSemesterSelectedIndexChanged);
            this.btnSearchSubject.Click         += new EventHandler(btnSearchSubjectClick);
            this.btnSearchEmployee.Click        += new EventHandler(btnSearchEmployeeClick);
            this.txtAmount.KeyPress             += new KeyPressEventHandler(txtAmountKeyPress);
            this.txtAmount.Validating           += new System.ComponentModel.CancelEventHandler(txtAmountValidating);
            this.txtAmount.Validated            += new EventHandler(txtAmountValidated);
            this.lnkEnroll.LinkClicked          += new LinkLabelLinkClickedEventHandler(lnkEnrollLinkClicked);
            this.lnkWithdraw.LinkClicked        += new LinkLabelLinkClickedEventHandler(lnkWithdrawLinkClicked);
            this.dgvEnrolled.MouseDown          += new MouseEventHandler(dgvEnrolledMouseDown);
            this.dgvEnrolled.KeyPress           += new KeyPressEventHandler(dgvEnrolledKeyPress);
            this.dgvEnrolled.KeyUp              += new KeyEventHandler(dgvEnrolledKeyUp);
            this.dgvEnrolled.DataSourceChanged  += new EventHandler(dgvEnrolledDataSourceChanged);
            this.dgvEnrolled.SelectionChanged   += new EventHandler(dgvEnrolledSelectionChanged);
            this.dgvWithdrawn.DataSourceChanged += new EventHandler(dgvWithdrawnDataSourceChanged);
            this.dgvWithdrawn.MouseDown         += new MouseEventHandler(dgvEnrolledMouseDown);
            this.lnkRealoadSpecialClass.Click   += new EventHandler(lnkRealoadSpecialClassClick);
        }
Ejemplo n.º 3
0
        } //----------------------------------

        //this function gets the employee image path
        private String GetEmployeeImagePath(CommonExchange.SysAccess userInfo, String patientId, String startUp)
        {
            String imagePath = startUp + _imagePath;

            if (!Directory.Exists(imagePath))
            {
                //creates the directory
                DirectoryInfo dirInfo = new DirectoryInfo(imagePath);
                dirInfo.Create();
                dirInfo.Attributes = FileAttributes.Hidden;
            }

            DataTable imageTable;

            using (DatabaseLib.DbLibPatientManager dbLib = new DatabaseLib.DbLibPatientManager())
            {
                imageTable = dbLib.SelectImagePatientInformation(userInfo, patientId);
            }

            using (DataTableReader tableReader = new DataTableReader(imageTable))
            {
                if (tableReader.HasRows)
                {
                    Int32 picColumn = 2;

                    while (tableReader.Read())
                    {
                        if (!tableReader.IsDBNull(picColumn))
                        {
                            imagePath += "\\" + tableReader["sysid_patient"].ToString() + tableReader["extension_name"].ToString();

                            if (!File.Exists(imagePath))
                            {
                                Int64 len = tableReader.GetBytes(picColumn, 0, null, 0, 0);
                                // Create a buffer to hold the bytes, and then
                                // read the bytes from the DataTableReader.
                                Byte[] buffer = new Byte[len];
                                tableReader.GetBytes(picColumn, 0, buffer, 0, (Int32)len);

                                // Create a new Bitmap object, passing the array
                                // of bytes to the constructor of a MemoryStream.
                                using (Bitmap image = new Bitmap(new MemoryStream(buffer)))
                                {
                                    image.Save(imagePath);
                                }
                            }
                        }
                    }
                }
                else
                {
                    imagePath = null;
                }

                tableReader.Close();
            }

            return(imagePath);
        } //------------------------------
Ejemplo n.º 4
0
        } //--------------------

        //this procedure initializes the class
        private void InitializeClass(CommonExchange.SysAccess userInfo)
        {
            //gets the server date and time
            using (DatabaseLib.DbLibGeneral dbLib = new DatabaseLib.DbLibGeneral())
            {
                s_serverDateTime = dbLib.GetServerDateTime(userInfo.Connection);
            } //----------------------
        }     //------------------------------
Ejemplo n.º 5
0
        }//-------------------------

        #endregion

        #region Programmers Defined Functions
        public void InitializeClass(CommonExchange.SysAccess userInfo)
        {
            //get the server Date and Time
            using (RemoteClient.RemCntBaseManager remClient = new RemoteClient.RemCntBaseManager())
            {
                _serverDateTime = remClient.GetServerDateTime(userInfo);
            } //---------------------
        }     //----------------------
Ejemplo n.º 6
0
        public EmployeeEarningSummary(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, EarningLogic incManager)
        {
            this.InitializeComponent();

            _userInfo   = userInfo;
            _empInfo    = empInfo;
            _incManager = incManager;
        }
Ejemplo n.º 7
0
        }//-------------------------

        //this procedure will select chart of accounts
        public void SelectChartOfAccountsArrangedList(CommonExchange.SysAccess userInfo, String queryString,
                                                      String summaryAccount, String accountingCategoryIdList, Boolean isActiveAccount)
        {
            using (RemoteClient.RemCntAccountingManager remClient = new RemoteClient.RemCntAccountingManager())
            {
                _chartOfAccountsTable = remClient.SelectChartOfAccounts(userInfo, queryString, summaryAccount, accountingCategoryIdList, isActiveAccount);
            }
        }//------------------------
        public EmployeeDeductionSummary(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, DeductionLogic decManager)
        {
            this.InitializeComponent();

            _userInfo   = userInfo;
            _empInfo    = empInfo;
            _decManager = decManager;
        }
Ejemplo n.º 9
0
        } //-----------------------

        //this procedure disable/enable print student list
        public void DisableEnableButtonStudentList(CommonExchange.SysAccess userInfo, Boolean value)
        {
            if (RemoteServerLib.ProcStatic.IsSystemAccessAdmin(userInfo) || RemoteServerLib.ProcStatic.IsSystemAccessCollegeRegistrar(userInfo))
            {
                this.btnPrintStudentList.Enabled      = value;
                this.btnPrintStudentInsurance.Enabled = value;
            }
        }//---------------------------
Ejemplo n.º 10
0
 //this procedure will Initialized the class
 private void InitializedClass(CommonExchange.SysAccess userInfo)
 {
     //get server date time
     using (RemoteClient.RemCntBaseManager remClient = new RemoteClient.RemCntBaseManager())
     {
         _serverDateTime = remClient.GetServerDateTime(userInfo);
     }
 }//-------------------------
        public PersonRelationshipCreate(CommonExchange.SysAccess userInfo, BaseServicesLogic baseServiceManager, String personSysIdExcludeList)
            : base(userInfo, baseServiceManager, personSysIdExcludeList)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnAdd.Click    += new EventHandler(btnAddClick);
        }
        public SchoolFeeParticularCreate(CommonExchange.SysAccess userInfo, SchoolFeeLogic schoolFeeManager)
            : base(userInfo, schoolFeeManager)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
Ejemplo n.º 13
0
        public ChartOfAccountCreate(CommonExchange.SysAccess userInfo, ChartOfAccountLogic chartOfAccountManager)
            : base(userInfo, chartOfAccountManager)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClossing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
        public MajorExamScheduleCreate(CommonExchange.SysAccess userInfo, MajorExamScheduleLogic majorExamScheduleMananger)
            : base(userInfo, majorExamScheduleMananger)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
Ejemplo n.º 15
0
        public PatientRegistrationCreate(CommonExchange.SysAccess userInfo, RegistrationLogic regManager, CommonExchange.Patient patientInfo)
            : base(userInfo, regManager, patientInfo)
        {
            this.InitializeComponent();

            this.FormClosing       += new FormClosingEventHandler(ClassClosing);
            this.btnRegister.Click += new EventHandler(btnRegisterClick);
            this.btnCancel.Click   += new EventHandler(btnCancelClick);
        }
Ejemplo n.º 16
0
        }//-----------------

        //this procedure will Update Student Information
        public void UpdateForIdMakerStudentInformation(CommonExchange.SysAccess userInfo, CommonExchange.Student studentInfo)
        {
            using (RemoteClient.RemCntIdMakerManager remClient = new RemoteClient.RemCntIdMakerManager())
            {
                remClient.UpdateForIdMakerStudentInformation(userInfo, studentInfo);
            }

            EditStudentEmployeeDataTable(studentInfo, null, this.IsStudent(studentInfo.StudentId));
        }//--------------------------
Ejemplo n.º 17
0
        public StudentEnrolmentHistory(CommonExchange.SysAccess userInfo, StudentLogic studentManager, CommonExchange.Student studentInfo, Boolean isForRegistrar)
            : base(userInfo, studentManager, isForRegistrar)
        {
            this.InitializeComponent();

            _studentInfo = studentInfo;

            this.btnClose.Click += new EventHandler(btnCloseClick);
        }
Ejemplo n.º 18
0
        } //------------------------------------

        //this procedure updates a patient information
        public void UpdatePatientInformation(CommonExchange.SysAccess userInfo, CommonExchange.Patient patientInfo)
        {
            using (DatabaseLib.DbLibPatientManager dbLib = new DatabaseLib.DbLibPatientManager())
            {
                dbLib.UpdatePatientInformation(userInfo, patientInfo);
            }

            _patientInfo = patientInfo;
        } //----------------------------
Ejemplo n.º 19
0
        public AccessPointInformation(CommonExchange.SysAccess userInfo)
        {
            this.InitializeComponent();

            _userInfo = userInfo;

            this.Load             += new EventHandler(ClassLoad);
            this.btnConnect.Click += new EventHandler(btnConnectClick);
        }
Ejemplo n.º 20
0
        public StudentCashierCreate(CommonExchange.SysAccess userInfo, StudentLogic studentManager, Boolean isForRegistrar)
            : base(userInfo, studentManager, isForRegistrar)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(StudentCreateFormClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
Ejemplo n.º 21
0
        //this function returns the patient registration table
        public DataTable SelectForCashReportPatientRegistration(CommonExchange.SysAccess userInfo, String dateFrom, String dateTo)
        {
            DataTable dbTable = new DataTable("CashReportTable");

            dbTable.Columns.Add("sysid_registration", System.Type.GetType("System.String"));
            dbTable.Columns.Add("sysid_patient", System.Type.GetType("System.String"));
            dbTable.Columns.Add("registration_date", System.Type.GetType("System.String"));
            dbTable.Columns.Add("medical_prescription", System.Type.GetType("System.String"));
            dbTable.Columns.Add("receipt_no", System.Type.GetType("System.String"));
            dbTable.Columns.Add("date_paid", System.Type.GetType("System.String"));
            dbTable.Columns.Add("amount", System.Type.GetType("System.Decimal"));
            dbTable.Columns.Add("last_name", System.Type.GetType("System.String"));
            dbTable.Columns.Add("first_name", System.Type.GetType("System.String"));
            dbTable.Columns.Add("middle_name", System.Type.GetType("System.String"));

            using (SqlCommand sqlComm = new SqlCommand())
            {
                sqlComm.Connection  = userInfo.Connection;
                sqlComm.CommandType = CommandType.StoredProcedure;
                sqlComm.CommandText = "dental.SelectForCashReportPatientRegistration";

                sqlComm.Parameters.Add("@date_from", SqlDbType.DateTime).Value = DateTime.Parse(dateFrom);
                sqlComm.Parameters.Add("@date_to", SqlDbType.DateTime).Value   = DateTime.Parse(dateTo);

                sqlComm.Parameters.Add("@system_user_id", SqlDbType.VarChar).Value = userInfo.UserId;

                using (SqlDataReader sqlReader = sqlComm.ExecuteReader())
                {
                    if (sqlReader.HasRows)
                    {
                        while (sqlReader.Read())
                        {
                            DataRow newRow = dbTable.NewRow();

                            newRow["sysid_registration"]   = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "sysid_registration", "");
                            newRow["sysid_patient"]        = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "sysid_patient", "");
                            newRow["registration_date"]    = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "registration_date", "");
                            newRow["medical_prescription"] = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "medical_prescription", "");
                            newRow["receipt_no"]           = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "receipt_no", "");
                            newRow["date_paid"]            = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "date_paid", "");
                            newRow["amount"]      = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "amount", Decimal.Parse("0"));
                            newRow["last_name"]   = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "last_name", "");
                            newRow["first_name"]  = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "first_name", "");
                            newRow["middle_name"] = DatabaseLib.ProcStatic.DataReaderConvert(sqlReader, "middle_name", "");

                            dbTable.Rows.Add(newRow);
                        }
                    }

                    sqlReader.Close();
                }

                dbTable.AcceptChanges();
            }

            return(dbTable);
        } //------------------------------------
Ejemplo n.º 22
0
        public BreakDownBankDepositCreate(CommonExchange.SysAccess userInfo, CashieringLogic cashieringManager, String dateStart, String dateEnd)
            : base(userInfo, cashieringManager, dateStart, dateEnd)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClossing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
Ejemplo n.º 23
0
        public EmployeeSearchOnTextboxList(CommonExchange.SysAccess userInfo, SpecialClassLogic specialManager)
        {
            this.InitializeComponent();

            _userInfo       = userInfo;
            _specialManager = specialManager;

            this.pbxRefresh.Click += new EventHandler(pbxRefreshClick);
        }
Ejemplo n.º 24
0
        public SpecialClassCreate(CommonExchange.SysAccess userInfo, SpecialClassLogic specialManager)
            : base(userInfo, specialManager)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
Ejemplo n.º 25
0
        public PaymentDetailsCreate(CommonExchange.SysAccess userInfo, CommonExchange.Patient patientInfo, CommonExchange.Registration regInfo,
                                    ChargesLogic chargesManager) : base(userInfo, patientInfo, regInfo, chargesManager)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
        }
Ejemplo n.º 26
0
        } //---------------------------

        //this function returns the user information dataset
        public DataSet GetUserInformationDataSet(CommonExchange.SysAccess userInfo)
        {
            DataSet dbSet = new DataSet("UserInformationDataSet");

            dbSet.Tables.Add(this.SelectSystemAccessCode(userInfo));
            dbSet.Tables.Add(this.SelectSystemUserInfo(userInfo));

            return(dbSet);
        } //------------------------
Ejemplo n.º 27
0
        public ReceiptNumberSearchOnTextBoxList(CommonExchange.SysAccess userInfo, CashieringLogic cashieringManager)
        {
            this.InitializeComponent();

            _userInfo          = userInfo;
            _cashieringManager = cashieringManager;

            this.pbxRefresh.Click += new EventHandler(pbxRefreshClick);
        }
Ejemplo n.º 28
0
        public AuxiliaryScheduleCreate(CommonExchange.SysAccess userInfo, AuxiliaryServiceLogic auxiliaryManager)
            : base(userInfo, auxiliaryManager)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClossing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }
Ejemplo n.º 29
0
        public UserSearchOnTextboxList(CommonExchange.SysAccess userInfo)
        {
            this.InitializeComponent();

            _userInfo = userInfo;

            this.lnkCreate.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkCreateLinkClicked);
            this.pbxRefresh.Click      += new EventHandler(pbxRefreshClick);
        }
Ejemplo n.º 30
0
        public StudentCourseCreate(CommonExchange.SysAccess userInfo, CommonExchange.Student studentInfo, StudentLogic studentManager, String couseGroupId)
            : base(userInfo, studentInfo, studentManager, couseGroupId)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
        }