Ejemplo n.º 1
0
        }//--------------------------

        //##########################################END CLASS StudentSearchList EVENTS#######################################################
        #endregion

        #region Programers-Defined Procedures
        //this procedure shows the search result
        private void ShowSearchResultDialog()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                String queryString = RemoteClient.ProcStatic.TrimStartEndString(this.ctlManager.GetSearchString);

                if (!String.IsNullOrEmpty(queryString))
                {
                    if (_cashieringManager.GetSearchedStudentDetails(_userInfo, queryString) == 1)
                    {
                        try
                        {
                            this.Cursor = Cursors.WaitCursor;

                            using (StudentTab frmShow = new StudentTab(_userInfo, _cashieringManager.GetDetailsStudentInformation(_userInfo,
                                                                                                                                  _cashieringManager.GetStudentIdForSingleInstance(), Application.StartupPath), _cashieringManager, CashieringLogic.ReceiptDate))
                            {
                                frmShow.ShowDialog(this);

                                this.ctlManager.SetFocusOnSearchTextBox();
                                this.ctlManager.ReceiptNo = CashieringLogic.ReceiptNumber;
                            }
                        }
                        catch (Exception ex)
                        {
                            RemoteClient.ProcStatic.ShowErrorDialog("\n\nError Loading Student Tab Mudule. \n\n" + ex.Message, "Error Loading");
                        }
                        finally
                        {
                            this.Cursor = Cursors.Arrow;
                        }
                    }
                    //else
                    //{
                    _frmStudentSearch.DataSource = _cashieringManager.PopulateStudentSearchedList();
                    //}
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Retrieving Data");
            }
            finally
            {
                this.ctlManager.SetFocusOnSearchTextBox();

                this.Cursor = Cursors.Arrow;
            }
        }//---------------------------------