예제 #1
0
        }//---------------------

        //event is raised when the key is pressed
        protected override void dgvListKeyPress(object sender, KeyPressEventArgs e)
        {
            base.dgvListKeyPress(sender, e);

            if (_hasSelected)
            {
                if (_pbxBase != null && _pbxBase.Image != null)
                {
                    _pbxBase.Image.Dispose();
                    _pbxBase.Image = null;
                }

                GC.SuppressFinalize(this);
                GC.Collect();

                if (_isForStudentVerificaion && !_isForNewUserVerification)
                {
                    _studentInfo = _baseServiceManager.SelectBySysIDPersonStudentInformation(_userInfo,
                                                                                             _baseServiceManager.GetPersonSysId(_rowIndex), Application.StartupPath);
                }
                else if (!_isForStudentVerificaion && _isForNewUserVerification)
                {
                    _newUserInfo = _baseServiceManager.SelectBySysIDPersonSystemUserInfo(_userInfo,
                                                                                         _baseServiceManager.GetPersonSysId(_rowIndex), Application.StartupPath);
                }
                else
                {
                    _empInfo = _baseServiceManager.SelectBySysIDPersonEmployeeInformation(_userInfo,
                                                                                          _baseServiceManager.GetPersonSysId(_rowIndex), Application.StartupPath);
                }


                this.Close();
            }
        }//--------------------
예제 #2
0
        public LogInLogOutEmployeeInformation(CommonExchange.SysAccess userInfo, CommonExchange.Employee employeeInfo, AttendanceLogic attendacManager)
            : base(userInfo, attendacManager)
        {
            this.InitializeComponent();

            _employeeInfo = employeeInfo;
        }
        //###########################################CLASS IDENTIFICATIONSTUDENTUPDATE ClassLoad EVENTS#####################################################
        //event is raised when the class is loaded
        protected override void  ClassLoad(object sender, EventArgs e)
        {
            _employeeInfo = new CommonExchange.Employee();

            this.txtIdName.Text = _studentInfo.StudentId;
            this.txtName.Text   = RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(_studentInfo.PersonInfo.LastName,
                                                                                       _studentInfo.PersonInfo.FirstName, _studentInfo.PersonInfo.MiddleName);
            this.txtTypeName.Text    = _studentInfo.CourseInfo.CourseTitle;
            this.txtAddressName.Text = _studentInfo.PersonInfo.PresentAddress;

            CommonExchange.PersonRelationship emrContact = _identificationManager.GetPersonEmergencyContact(_studentInfo.PersonInfo.PersonRelationshipList);

            this.txtEmerName.Text = RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(emrContact.PersonInRelationshipWith.LastName,
                                                                                         emrContact.PersonInRelationshipWith.FirstName, emrContact.PersonInRelationshipWith.MiddleName);
            this.txtEmerAddress.Text  = emrContact.PersonInRelationshipWith.PresentAddress;
            this.txtEmerPhone.Text    = emrContact.PersonInRelationshipWith.PresentPhoneNos;
            this.txtRelationship.Text = emrContact.RelationshipTypeInfo.RelationshipDescription;

            this.txtCardNumber.Text = _studentInfo.CardNumber;

            if (!String.IsNullOrEmpty(_studentInfo.PersonInfo.FilePath))
            {
                this.pbxPhoto.Image = Image.FromFile(_studentInfo.PersonInfo.FilePath);
            }
        }
예제 #4
0
        } //-------------------------------

        //this procedure updates the employee information
        public void UpdateEmployeeInformation(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo)
        {
            using (RemoteClient.RemCntEmployeeManager remClient = new RemoteClient.RemCntEmployeeManager())
            {
                remClient.UpdateEmployeeInformation(userInfo, empInfo);
            }

            Int32 index = 0;

            foreach (DataRow empRow in _classDataSet.Tables["EmployeeInformationTable"].Rows)
            {
                if (String.Equals(empInfo.EmployeeSysId, empRow["sysid_employee"].ToString()))
                {
                    DataRow editRow = _classDataSet.Tables["EmployeeInformationTable"].Rows[index];

                    editRow.BeginEdit();

                    editRow["employee_id"] = empInfo.EmployeeId;
                    editRow["card_number"] = empInfo.CardNumber;
                    editRow["last_name"]   = empInfo.PersonInfo.LastName;
                    editRow["first_name"]  = empInfo.PersonInfo.FirstName;
                    editRow["middle_name"] = empInfo.PersonInfo.MiddleName;
                    editRow["type_no"]     = empInfo.SalaryInfo.EmploymentTypeInfo.TypeNo;
                    editRow["status_id"]   = empInfo.SalaryInfo.EmployeeStatusInfo.StatusId;

                    editRow.EndEdit();

                    break;
                }

                index++;
            }

            _classDataSet.Tables["EmployeeInformationTable"].AcceptChanges();
        } //----------------------------------
예제 #5
0
        public LoanRemittanceSummary(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, LoanRemittanceLogic loanManager)
        {
            this.InitializeComponent();

            _userInfo    = userInfo;
            _empInfo     = empInfo;
            _loanManager = loanManager;

            this.Load += new EventHandler(ClassLoad);
            this.dgvLoan.MouseDown               += new MouseEventHandler(dgvLoanMouseDown);
            this.dgvLoan.DoubleClick             += new EventHandler(dgvLoanDoubleClick);
            this.dgvLoan.KeyPress                += new KeyPressEventHandler(dgvLoanKeyPress);
            this.dgvLoan.KeyDown                 += new KeyEventHandler(dgvLoanKeyDown);
            this.dgvLoan.DataSourceChanged       += new EventHandler(dgvLoanDataSourceChanged);
            this.dgvLoan.SelectionChanged        += new EventHandler(dgvLoanSelectionChanged);
            this.dgvRemittance.MouseDown         += new MouseEventHandler(dgvRemittanceMouseDown);
            this.dgvRemittance.DoubleClick       += new EventHandler(dgvRemittanceDoubleClick);
            this.dgvRemittance.KeyPress          += new KeyPressEventHandler(dgvRemittanceKeyPress);
            this.dgvRemittance.KeyDown           += new KeyEventHandler(dgvRemittanceKeyDown);
            this.dgvRemittance.DataSourceChanged += new EventHandler(dgvRemittanceDataSourceChanged);
            this.dgvRemittance.SelectionChanged  += new EventHandler(dgvRemittanceSelectionChanged);
            this.btnApply.Click  += new EventHandler(btnApplyClick);
            this.btnClose.Click  += new EventHandler(btnCloseClick);
            this.btnCreate.Click += new EventHandler(btnCreateClick);
            this.btnPrint.Click  += new EventHandler(btnPrintClick);
        }
예제 #6
0
        }//---------------------------

        //event is raised when the mouse is double clicked
        private void dgvListMouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (_rowIndex >= 0)
            {
                _hasSelected = true;

                if (!_isForPersonVerification)
                {
                    if (_pbxPerson.Image != null)
                    {
                        _pbxPerson.Image.Dispose();
                        _pbxPerson.Image = null;
                    }

                    GC.SuppressFinalize(this);
                    GC.Collect();

                    if (_isForStudentVerification)
                    {
                        _studentInfo = _baseServicesManager.SelectBySysIDPersonStudentInformation(_userInfo,
                                                                                                  _baseServicesManager.GetPersonSysId(_rowIndex), Application.StartupPath);
                    }
                    else
                    {
                        _employeeInfo = _baseServicesManager.SelectBySysIDPersonEmployeeInformation(_userInfo,
                                                                                                    _baseServicesManager.GetPersonSysId(_rowIndex), Application.StartupPath);
                    }
                }

                this.Close();
            }
        }//---------------------------
예제 #7
0
        }//------------------------

        //this fucntion will returns Employee Details
        public CommonExchange.Employee GetDetailsEmployeeInformation(CommonExchange.SysAccess userInfo, String studentEmployeeId, String startUp)
        {
            CommonExchange.Employee employeeInfo = new CommonExchange.Employee();

            String strFilter = "student_employee_id = '" + studentEmployeeId + "'";

            DataRow[] selectRow = _studentEmployeeTable.Select(strFilter, "student_employee_id ASC");

            foreach (DataRow row in selectRow)
            {
                employeeInfo.EmployeeSysId          = RemoteServerLib.ProcStatic.DataRowConvert(row, "sysid_student_employee", "");
                employeeInfo.EmployeeId             = RemoteServerLib.ProcStatic.DataRowConvert(row, "student_employee_id", "");
                employeeInfo.CardNumber             = RemoteServerLib.ProcStatic.DataRowConvert(row, "card_number", "");
                employeeInfo.PersonInfo.PersonSysId = RemoteServerLib.ProcStatic.DataRowConvert(row, "sysid_person", "");
                employeeInfo.PersonInfo.LastName    = RemoteServerLib.ProcStatic.DataRowConvert(row, "last_name", "");
                employeeInfo.PersonInfo.FirstName   = RemoteServerLib.ProcStatic.DataRowConvert(row, "first_name", "");
                employeeInfo.PersonInfo.MiddleName  = RemoteServerLib.ProcStatic.DataRowConvert(row, "middle_name", "");

                break;
            }

            employeeInfo.PersonInfo.FilePath = this.GetPersonImagePath(userInfo, employeeInfo.PersonInfo.PersonSysId,
                                                                       employeeInfo.PersonInfo.PersonImagesFolder(startUp));

            return(employeeInfo);
        }//------------------------
예제 #8
0
        public EmployeeEarningSummary(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, EarningLogic incManager)
        {
            this.InitializeComponent();

            _userInfo   = userInfo;
            _empInfo    = empInfo;
            _incManager = incManager;
        }
        public EmployeeDeductionSummary(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, DeductionLogic decManager)
        {
            this.InitializeComponent();

            _userInfo   = userInfo;
            _empInfo    = empInfo;
            _decManager = decManager;
        }
예제 #10
0
        }//--------------------

        //##################################END PICTUREBOX pbxChecked EVENTS######################################################

        //##################################PICTUREBOX pbxInsertSubjects EVENTS######################################################
        //event is raised when the picture box is clicked
        private void pbxInsertSubjectsClick(object sender, EventArgs e)
        {
            Boolean hasInserted = false;
            Boolean hasErrors   = false;

            this.dgvList.EndEdit();

            this.dgvList.ShowCellErrors = true;

            DataTable conflictSchduleTable = _teacherLoadingManager.SelectByScheduleDetailsListConflictsWithAnotherScheduleTeacherLoad(_userInfo,
                                                                                                                                       (DataTable)this.dgvList.DataSource, _employeeId);

            for (Int32 x = 0; x < this.dgvList.Rows.Count; x++)
            {
                if ((Boolean)this.dgvList.Rows[x].Cells["checkbox_column"].Value)
                {
                    if (!_teacherLoadingManager.HasConflictSchedule(conflictSchduleTable, dgvList.Rows[x].Cells["sysid_schedule"].Value.ToString()))
                    {
                        _teacherLoadingManager.InsertTeacherLoadCached(_employeeId, dgvList.Rows[x].Cells["sysid_schedule"].Value.ToString());

                        hasInserted = true;
                    }
                    else
                    {
                        this.dgvList.Rows[x].Cells["checkbox_column"].Value = false;

                        DataGridViewCell dgvCell = this.dgvList.Rows[x].Cells["sysid_schedule"];

                        CommonExchange.Employee empInfo = _teacherLoadingManager.GetEmployeeInformation(_userInfo, _employeeId);

                        dgvCell.ErrorText = "This schedule conflicts with another schedule that has been loaded to " +
                                            RemoteClient.ProcStatic.GetCompleteNameFullMiddleName(empInfo.PersonInfo.LastName, empInfo.PersonInfo.FirstName,
                                                                                                  empInfo.PersonInfo.MiddleName) + " from another department.";

                        ToolTip errToolTip = new ToolTip();

                        errToolTip.Show(dgvCell.ErrorText, this.dgvList, 10);

                        hasErrors = true;
                    }
                }
            }

            if (hasInserted)
            {
                _hasSelected = true;
                this.Close();
            }
            else if (!hasErrors)
            {
                MessageBox.Show("There is no subject schedule / service that has been selected!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }//-------------------------
예제 #11
0
        }//------------------------

        //#########################################END LINLLABEL lnkVerified EVENTS###########################################################

        //#########################################LINLLABEL lnkPersonArchive EVENTS###########################################################
        //event is raised when the control is clicked
        protected override void lnkPersonArchiveLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            base.IsForStudentVerification = base.IsForPersonVerification = false;

            base.lnkPersonArchiveLinkClicked(sender, e);

            if (base.HasSelectedForPersonUpdate)
            {
                _empInfo = base.EmployeeInformation;
            }

            _rowIndexForPersonSearch = base.RowIndexForPersonSearch;
        }//-------------------------
예제 #12
0
        public LoanInformationCreate(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, LoanRemittanceLogic loanManager)
        {
            this.InitializeComponent();

            _userInfo    = userInfo;
            _empInfo     = empInfo;
            _loanManager = loanManager;

            this.Load            += new EventHandler(ClassLoad);
            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCancelClick);
            this.btnApply.Click  += new EventHandler(btnApplyClick);
        }
        public IdentificationEmployeeUpdate(CommonExchange.SysAccess userInfo, CommonExchange.Employee employeeInfo,
                                            IdentificationLogic identificationManager)
            : base(userInfo, identificationManager)
        {
            this.InitializeComponent();

            _employeeInfo     = employeeInfo;
            _employeeInfoTemp = (CommonExchange.Employee)employeeInfo.Clone();

            this.FormClosing     += new System.Windows.Forms.FormClosingEventHandler(IdentificationEmployeeUpdateFormClosing);
            this.btnClose.Click  += new EventHandler(btnCloseClick);
            this.btnUpdate.Click += new EventHandler(btnUpdateClick);
        }
예제 #14
0
         public EmployeeUpdate(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, EmployeeLogic empManager) 
            : base(userInfo, empManager)
        {
            this.InitializeComponent();

            _empInfo = empInfo;

            _errProvider = new ErrorProvider();
            
            this.FormClosing += new FormClosingEventHandler(ClassClosing);
            this.btnUpdate.Click += new EventHandler(btnUpdateClick);
            this.btnClose.Click += new EventHandler(btnDoneClick);
        }
예제 #15
0
        public ViewUpdateEarning(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo,
                                 EarningLogic incManager, Int64 earningId)
        {
            this.InitializeComponent();

            _userInfo   = userInfo;
            _empInfo    = empInfo;
            _incManager = incManager;
            _earningId  = earningId;

            this.Load            += new EventHandler(ClassLoad);
            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.lnkChange.Click += new EventHandler(lnkChangeClick);
        }
예제 #16
0
        public ViewUpdateDeduction(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo,
                                   DeductionLogic decManager, Int64 deductionId)
        {
            this.InitializeComponent();

            _userInfo    = userInfo;
            _empInfo     = empInfo;
            _decManager  = decManager;
            _deductionId = deductionId;

            this.Load            += new EventHandler(ClassLoad);
            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.lnkChange.Click += new EventHandler(lnkChangeClick);
        }
예제 #17
0
        //this procedure prints the employee deduction list
        public void PrintEmployeeDeductionList(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, DateTime dateFrom,
                                               DateTime dateTo)
        {
            DataTable reportTable = new DataTable("EarningDeduction");

            reportTable.Columns.Add("id", System.Type.GetType("System.Int64"));
            reportTable.Columns.Add("date_string", System.Type.GetType("System.String"));
            reportTable.Columns.Add("description", System.Type.GetType("System.String"));
            reportTable.Columns.Add("amount", System.Type.GetType("System.Decimal"));

            foreach (DataRow decRow in _decTableBySearch.Rows)
            {
                DataRow newRow = reportTable.NewRow();

                newRow["id"]          = decRow["deduction_id"];
                newRow["date_string"] = DateTime.Parse(decRow["deduction_date"].ToString()).ToShortDateString() + " " +
                                        DateTime.Parse(decRow["deduction_date"].ToString()).ToShortTimeString();
                newRow["description"] = decRow["deduction_description"];
                newRow["amount"]      = decRow["amount"];

                reportTable.Rows.Add(newRow);
            }

            reportTable.AcceptChanges();

            using (ClassEarningDeductionManager.CrystalReport.CrystalEmployeeEarningDeductionList rptDeduction =
                       new EmployeeServices.ClassEarningDeductionManager.CrystalReport.CrystalEmployeeEarningDeductionList())
            {
                rptDeduction.Database.Tables["earning_deduction"].SetDataSource(reportTable);

                rptDeduction.SetParameterValue("@school_name", CommonExchange.SchoolInformation.SchoolName);
                rptDeduction.SetParameterValue("@address", CommonExchange.SchoolInformation.Address);
                rptDeduction.SetParameterValue("@phone_nos", CommonExchange.SchoolInformation.PhoneNos);
                rptDeduction.SetParameterValue("@report_name", "Employee Deduction Summary");
                rptDeduction.SetParameterValue("@date_covered", "as of " + dateFrom.ToLongDateString() + " to " + dateTo.ToLongDateString());
                rptDeduction.SetParameterValue("@employee_id", empInfo.EmployeeId);
                rptDeduction.SetParameterValue("@employee_name", RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(empInfo.PersonInfo.LastName,
                                                                                                                      empInfo.PersonInfo.FirstName, empInfo.PersonInfo.MiddleName));
                rptDeduction.SetParameterValue("@printer_info", "Date/Time Printed: " + DateTime.Parse(_serverDateTime).ToShortDateString() + " " +
                                               DateTime.Parse(_serverDateTime).ToShortTimeString() + "      Printed by: " +
                                               RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(userInfo.PersonInfo.LastName, userInfo.PersonInfo.FirstName,
                                                                                                    userInfo.PersonInfo.MiddleName));
                rptDeduction.SetParameterValue("@total", "Total deductions-to-date:");

                using (RemoteClient.CrystalReportViewer frmViewer = new RemoteClient.CrystalReportViewer(rptDeduction))
                {
                    frmViewer.ShowDialog();
                }
            }
        } //-----------------------------------------
예제 #18
0
        }//------------------

        //this function will get emplyee information by person system id
        public CommonExchange.Employee SelectBySysIDPersonEmployeeInformation(CommonExchange.SysAccess userInfo, String personSysId, String startUp)
        {
            CommonExchange.Employee employeeInfo = new CommonExchange.Employee();

            using (RemoteClient.RemCntEmployeeManager remClient = new RemoteClient.RemCntEmployeeManager())
            {
                employeeInfo = remClient.SelectBySysIDPersonEmployeeInformation(userInfo, personSysId);
            }

            employeeInfo.PersonInfo.FilePath = this.GetPersonImagePath(userInfo, employeeInfo.PersonInfo.PersonSysId,
                                                                       employeeInfo.PersonInfo.PersonImagesFolder(startUp));

            return(employeeInfo);
        }//---------------------
예제 #19
0
        public EmployeeRemittance()
        {
            InitializeComponent();

            _userInfo = new CommonExchange.SysAccess();
            _empInfo  = new CommonExchange.Employee();
            _loanInfo = new CommonExchange.LoanInformation();
            _remInfo  = new CommonExchange.EmployeeLoanRemittance();

            _errProvider = new ErrorProvider();

            this.lnkChangeDate.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkChangeDateLinkClicked);
            this.txtAmountPaid.KeyPress    += new KeyPressEventHandler(txtAmountPaidKeyPress);
            this.txtAmountPaid.KeyUp       += new KeyEventHandler(txtAmountPaidKeyUp);
            this.txtAmountPaid.Validating  += new System.ComponentModel.CancelEventHandler(txtAmountPaidValidating);
        }
예제 #20
0
        }//------------------------

        //this fucntion will returns Employee Details
        public CommonExchange.Employee GetDetailsEmployeeInformation(CommonExchange.SysAccess userInfo, String studentEmployeeId, String startUp)
        {
            CommonExchange.Employee employeeInfo = new CommonExchange.Employee();

            String strFilter = "student_employee_id = '" + studentEmployeeId + "'";

            DataRow[] selectRow = _studentEmployeeTable.Select(strFilter, "student_employee_id ASC");

            foreach (DataRow row in selectRow)
            {
                employeeInfo.EmployeeSysId             = RemoteServerLib.ProcStatic.DataRowConvert(row, "sysid_student_employee", "");
                employeeInfo.EmployeeId                = RemoteServerLib.ProcStatic.DataRowConvert(row, "student_employee_id", "");
                employeeInfo.CardNumber                = RemoteServerLib.ProcStatic.DataRowConvert(row, "card_number", "");
                employeeInfo.PersonInfo.LastName       = RemoteServerLib.ProcStatic.DataRowConvert(row, "last_name", "");
                employeeInfo.PersonInfo.FirstName      = RemoteServerLib.ProcStatic.DataRowConvert(row, "first_name", "");
                employeeInfo.PersonInfo.MiddleName     = RemoteServerLib.ProcStatic.DataRowConvert(row, "middle_name", "");
                employeeInfo.PersonInfo.PresentAddress = RemoteServerLib.ProcStatic.DataRowConvert(row, "present_address", "");
                employeeInfo.SalaryInfo.DepartmentInfo.DepartmentName = RemoteServerLib.ProcStatic.DataRowConvert(row, "course_title_department_name", "");
                employeeInfo.SalaryInfo.DepartmentInfo.Acronym        = RemoteServerLib.ProcStatic.DataRowConvert(row, "acronym_employment_type", "");
                employeeInfo.PersonInfo.PersonSysId = RemoteServerLib.ProcStatic.DataRowConvert(row, "sysid_person", "");

                if (employeeInfo.PersonInfo.PersonRelationshipList.Count < 1)
                {
                    CommonExchange.PersonRelationship personRelationshipInfo = new CommonExchange.PersonRelationship();

                    personRelationshipInfo.IsEmergencyContact = true;
                    personRelationshipInfo.PersonInRelationshipWith.LastName            = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_last_name", "");
                    personRelationshipInfo.PersonInRelationshipWith.FirstName           = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_first_name", "");
                    personRelationshipInfo.PersonInRelationshipWith.MiddleName          = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_middle_name", "");
                    personRelationshipInfo.PersonInRelationshipWith.PresentAddress      = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_present_address", "");
                    personRelationshipInfo.PersonInRelationshipWith.PresentPhoneNos     = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_present_phone_nos", "");
                    personRelationshipInfo.PersonInRelationshipWith.HomeAddress         = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_home_address", "");
                    personRelationshipInfo.PersonInRelationshipWith.HomePhoneNos        = RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_home_phone_nos", "");
                    personRelationshipInfo.RelationshipTypeInfo.RelationshipDescription =
                        RemoteServerLib.ProcStatic.DataRowConvert(row, "emer_relationship_description", "");

                    employeeInfo.PersonInfo.PersonRelationshipList.Add(personRelationshipInfo);
                }

                break;
            }

            employeeInfo.PersonInfo.FilePath = this.GetPersonImagePath(userInfo, employeeInfo.PersonInfo.PersonSysId,
                                                                       employeeInfo.PersonInfo.PersonImagesFolder(startUp));

            return(employeeInfo);
        }//------------------------
예제 #21
0
        }//-------------------------------

        //this procedure shows the updated form
        private void ShowUpdateEmployeeDialog(CommonExchange.Employee empInfo)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                if (empInfo != null)
                {
                    Boolean isForEmployeeUpdate = false;

                    using (EmployeeUpdate frmUpdate = new EmployeeUpdate(_userInfo, empInfo, _empManager))
                    {
                        _frmSearch.WindowState = FormWindowState.Minimized;

                        frmUpdate.ShowDialog(this);

                        if (frmUpdate.HasUpdated)
                        {
                            _frmSearch.DataSource = _empManager.GetSelectedEmployeeInformation(_searchFilter);
                        }
                        else if (frmUpdate.IsForEmployeeUpdate)
                        {
                            isForEmployeeUpdate = true;

                            empInfo = frmUpdate.EmployeeInformation;
                        }

                        _frmSearch.WindowState = FormWindowState.Normal;
                    }

                    if (isForEmployeeUpdate)
                    {
                        this.ShowUpdateEmployeeDialog(empInfo);
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Update Employee Module");
            }
            finally
            {
                this.ctlManager.SetFocusOnSearchTextBox();

                this.Cursor = Cursors.Arrow;
            }
        }//-------------------------------
예제 #22
0
        public LoanInformationUpdate(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo, CommonExchange.LoanInformation loanInfo,
                                     LoanRemittanceLogic loanManager)
        {
            this.InitializeComponent();

            _userInfo     = userInfo;
            _empInfo      = empInfo;
            _loanManager  = loanManager;
            _loanInfo     = loanInfo;
            _loanInfoTemp = (CommonExchange.LoanInformation)loanInfo.Clone();

            this.Load            += new EventHandler(ClassLoad);
            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnUpdate.Click += new EventHandler(btnUpdateClick);
            this.btnClose.Click  += new EventHandler(btnCloseClick);
            this.btnDelete.Click += new EventHandler(btnDeleteClick);
        }
예제 #23
0
        }//---------------------------

        //####################################################END LINKLABEL lnkVerify EVENTS###############################################

        //####################################################LINKLABEL lnkPersonArchive EVENTS###############################################
        //event is raised when the control is clicked
        protected virtual void lnkPersonArchiveLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                using (PersonSearchOnTextBoxList frmSearch = new PersonSearchOnTextBoxList(_userInfo, _baseServiceManager,
                                                                                           _isForStudentVerification, _isForNewUserVerification, this.pbxPerson))
                {
                    frmSearch.CreatePersonVisible = false;
                    frmSearch.ShowDialog(this);

                    if (frmSearch.HasSelected)
                    {
                        _rowIndex = frmSearch.RowIndex;

                        _personInfo = _baseServiceManager.GetPersonDetails(_userInfo,
                                                                           _baseServiceManager.GetPersonSysId(frmSearch.RowIndex), Application.StartupPath);

                        if (!_isForStudentVerification && !_isForNewUserVerification)
                        {
                            _empInfo = frmSearch.EmployeeInfo;
                        }

                        if (_isForNewUserVerification && !_isForStudentVerification)
                        {
                            _newUserInfo = frmSearch.NewUserInfo;
                        }

                        this.AssingControlsValue();
                        this.SetPersonInformationControls(true);

                        _hasSelectedForPersonUpdate = true;
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading");
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }//--------------------------
예제 #24
0
        } //-------------------------------

        //this function gets the employee information
        public CommonExchange.Employee GetDetailsEmployeeInformation(CommonExchange.SysAccess userInfo, String employeeIdPersonId, String startUpPath,
                                                                     Boolean searchByEmployeeId)
        {
            CommonExchange.Employee employeeInfo = new CommonExchange.Employee();

            using (RemoteClient.RemCntEmployeeManager remClient = new RemoteClient.RemCntEmployeeManager())
            {
                if (searchByEmployeeId)
                {
                    employeeInfo = remClient.SelectByEmployeeIDEmployeeInformation(userInfo, employeeIdPersonId);
                }
                else
                {
                    employeeInfo = remClient.SelectBySysIDPersonEmployeeInformation(userInfo, employeeIdPersonId);
                }

                if (!String.IsNullOrEmpty(employeeInfo.PersonInfo.BirthDate))
                {
                    DateTime bDate = DateTime.Parse(employeeInfo.PersonInfo.BirthDate);

                    if (DateTime.Compare(bDate, DateTime.MinValue) == 0)
                    {
                        employeeInfo.PersonInfo.BirthDate = String.Empty;
                    }
                }

                if (!String.IsNullOrEmpty(employeeInfo.PersonInfo.MarriageDate))
                {
                    DateTime mDate = DateTime.Parse(employeeInfo.PersonInfo.MarriageDate);

                    if (DateTime.Compare(mDate, DateTime.MinValue) == 0)
                    {
                        employeeInfo.PersonInfo.MarriageDate = String.Empty;
                    }
                }
            }

            employeeInfo.PersonInfo.FilePath = base.GetPersonImagePath(userInfo, employeeInfo.PersonInfo.PersonSysId,
                                                                       employeeInfo.PersonInfo.PersonImagesFolder(startUpPath));

            return(employeeInfo);
        } //-----------------------
예제 #25
0
        public LoanInformation()
        {
            InitializeComponent();

            _userInfo = new CommonExchange.SysAccess();
            _empInfo  = new CommonExchange.Employee();
            _loanInfo = new CommonExchange.LoanInformation();

            _errProvider = new ErrorProvider();

            this.txtReferenceNo.Validated           += new EventHandler(txtReferenceNoValidated);
            this.txtPrincipal.KeyPress              += new KeyPressEventHandler(txtPrincipalKeyPress);
            this.txtPrincipal.Validating            += new System.ComponentModel.CancelEventHandler(txtPrincipalValidating);
            this.txtPrincipal.Validated             += new EventHandler(txtPrincipalValidated);
            this.txtMonthlyAmmortization.KeyPress   += new KeyPressEventHandler(txtMonthlyAmmortizationKeyPress);
            this.txtMonthlyAmmortization.Validating += new System.ComponentModel.CancelEventHandler(txtMonthlyAmmortizationValidating);
            this.txtMonthlyAmmortization.Validated  += new EventHandler(txtMonthlyAmmortizationValidated);
            this.lnkReleaseDate.LinkClicked         += new LinkLabelLinkClickedEventHandler(lnkReleaseDateLinkClicked);
            this.lnkMaturityDate.LinkClicked        += new LinkLabelLinkClickedEventHandler(lnkMaturityDateLinkClicked);
            this.cboLoanType.SelectedIndexChanged   += new EventHandler(cboLoanTypeSelectedIndexChanged);
        }
예제 #26
0
        }//------------------------

        //#########################################END LINLLABEL lnkCreateRelationship EVENTS###########################################################

        //#########################################LINLLABEL lnkVerified EVENTS###########################################################
        //event is raised when the control is clicked
        protected override void lnkVerifyLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            base.IsForStudentVerification = base.IsForPersonVerification = false;

            base.lnkVerifyLinkClicked(sender, e);

            if (base.HasSelectedPersonFromVerification)
            {
                _empInfo = _empManager.GetDetailsEmployeeInformation(_userInfo, base.PersonInfo.PersonSysId, Application.StartupPath, false);

                if (String.IsNullOrEmpty(_empInfo.PersonInfo.PersonSysId))
                {
                    _empInfo.PersonInfo = base.PersonInfo;
                }

                if (String.IsNullOrEmpty(_empInfo.EmployeeSysId))
                {
                    this.InitializeControls();
                }
            }
        }//------------------------
예제 #27
0
        //this procedure inserts a new employee
        public void InsertEmployeeInformation(CommonExchange.SysAccess userInfo, CommonExchange.Employee empInfo)
        {
            using (RemoteClient.RemCntEmployeeManager remClient = new RemoteClient.RemCntEmployeeManager())
            {
                remClient.InsertEmployeeInformation(userInfo, ref empInfo);
            }

            DataRow newRow = _classDataSet.Tables["EmployeeInformationTable"].NewRow();

            newRow["sysid_employee"] = empInfo.EmployeeSysId;
            newRow["employee_id"]    = empInfo.EmployeeId;
            newRow["card_number"]    = empInfo.CardNumber;
            newRow["last_name"]      = empInfo.PersonInfo.LastName;
            newRow["first_name"]     = empInfo.PersonInfo.FirstName;
            newRow["middle_name"]    = empInfo.PersonInfo.MiddleName;
            newRow["type_no"]        = empInfo.SalaryInfo.EmploymentTypeInfo.TypeNo;
            newRow["status_id"]      = empInfo.SalaryInfo.EmployeeStatusInfo.StatusId;

            _classDataSet.Tables["EmployeeInformationTable"].Rows.Add(newRow);
            _classDataSet.Tables["EmployeeInformationTable"].AcceptChanges();
        } //-------------------------------
예제 #28
0
        //##################################CLASS EmployeeCreate EVENTS########################################
        //event is raised when the class is loaded
        protected override void ClassLoad(object sender, EventArgs e)
        {
            base.ClassLoad(sender, e);

            if (!hasEnter)
            {
                //instantiate a new employee information
                _empInfo = new CommonExchange.Employee();
                //---------------------

                _empInfo.ObjectState = DataRowState.Added;

                this.InitializeControls();

                _baseServiceManager.InitializePersonRelationshipDataGridView(this.dgvRelationship, _personInfo.PersonRelationshipList, lblEmerStatus);

                RemoteClient.ProcStatic.SetDataGridViewColumns(this.dgvRelationship, false);

                hasEnter = true;
            }

            this.gbxFirstPart.Enabled = this.gbxSecondPart.Enabled = this.gbxRestDay.Enabled = false;
        }//---------------------
예제 #29
0
        } //------------------------------

        //this function gets the employee information
        public CommonExchange.Employee GetDetailsEmployeeInformation(String empId)
        {
            CommonExchange.Employee empInfo = new CommonExchange.Employee();

            String strFilter = "employee_id = '" + empId + "'";

            DataRow[] selectRow = _classDataSet.Tables["EmployeeInformationTable"].Select(strFilter, "sysid_employee ASC");

            foreach (DataRow empRow in selectRow)
            {
                empInfo.EmployeeSysId         = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "sysid_employee", "");
                empInfo.EmployeeId            = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "employee_id", "");
                empInfo.CardNumber            = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "card_number", "");
                empInfo.PersonInfo.LastName   = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "last_name", "");
                empInfo.PersonInfo.FirstName  = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "first_name", "");
                empInfo.PersonInfo.MiddleName = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "middle_name", "");
                empInfo.SalaryInfo.EmploymentTypeInfo.TypeNo = (CommonExchange.EmploymentTypeNo)RemoteServerLib.ProcStatic.DataRowConvert(empRow,
                                                                                                                                          "type_no", Byte.Parse("0"));
                empInfo.SalaryInfo.EmployeeStatusInfo.StatusId = RemoteServerLib.ProcStatic.DataRowConvert(empRow, "status_id", Byte.Parse("0"));
            }

            return(empInfo);
        } //-----------------------
예제 #30
0
        } //-------------------------------------------

        //############################################END BUTTON btnSearchSubject EVENTS#################################################

        //###############################################BUTTON btnSearchEmployee EVENTS#####################################################
        //event is raised when the button is clicked
        private void btnSearchEmployeeClick(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                using (EmployeeSearchOnTextboxList frmSearch = new EmployeeSearchOnTextboxList(_userInfo, _specialManager))
                {
                    frmSearch.AdoptGridSize = true;
                    frmSearch.ShowDialog(this);

                    if (frmSearch.HasSelected)
                    {
                        _employeeInfo = _specialManager.GetDetailsByEmployeeIdEmployeeInformation(frmSearch.PrimaryId);

                        _specialInfo.EmployeeSysId = _employeeInfo.EmployeeSysId;

                        lblEmployeeId.Text   = _employeeInfo.EmployeeId;
                        lblEmployeeName.Text = _employeeInfo.PersonInfo.LastName.ToUpper() + ", " + _employeeInfo.PersonInfo.FirstName + " " +
                                               _employeeInfo.PersonInfo.MiddleName;
                        lblEmployeeStatus.Text = _employeeInfo.SalaryInfo.EmployeeStatusInfo.StatusDescription + ", " +
                                                 _employeeInfo.SalaryInfo.EmploymentTypeInfo.TypeDescription;
                        lblEmployeeDepartmentName.Text = _employeeInfo.SalaryInfo.DepartmentInfo.DepartmentName;
                    }

                    _specialManager.SetSelectedDataTableToNull();
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Subject Search Module");
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        } //---------------------------------------