public Authenticate(CommonExchange.SysAccess userInfo) { if (!IsValidated(userInfo)) { throw new Exception("Only authenticated users are allowed to access the system."); } }
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); }
} //---------------------------------- //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); } //------------------------------
} //-------------------- //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); } //---------------------- } //------------------------------
}//------------------------- #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); } //--------------------- } //----------------------
public EmployeeEarningSummary(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, EarningLogic incManager) { this.InitializeComponent(); _userInfo = userInfo; _empInfo = empInfo; _incManager = incManager; }
}//------------------------- //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; }
} //----------------------- //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; } }//---------------------------
//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); }
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); }
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); }
}//----------------- //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)); }//--------------------------
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); }
} //------------------------------------ //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; } //----------------------------
public AccessPointInformation(CommonExchange.SysAccess userInfo) { this.InitializeComponent(); _userInfo = userInfo; this.Load += new EventHandler(ClassLoad); this.btnConnect.Click += new EventHandler(btnConnectClick); }
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); }
//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); } //------------------------------------
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); }
public EmployeeSearchOnTextboxList(CommonExchange.SysAccess userInfo, SpecialClassLogic specialManager) { this.InitializeComponent(); _userInfo = userInfo; _specialManager = specialManager; this.pbxRefresh.Click += new EventHandler(pbxRefreshClick); }
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); }
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); }
} //--------------------------- //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); } //------------------------
public ReceiptNumberSearchOnTextBoxList(CommonExchange.SysAccess userInfo, CashieringLogic cashieringManager) { this.InitializeComponent(); _userInfo = userInfo; _cashieringManager = cashieringManager; this.pbxRefresh.Click += new EventHandler(pbxRefreshClick); }
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); }
public UserSearchOnTextboxList(CommonExchange.SysAccess userInfo) { this.InitializeComponent(); _userInfo = userInfo; this.lnkCreate.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkCreateLinkClicked); this.pbxRefresh.Click += new EventHandler(pbxRefreshClick); }
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); }