} //-------------------------------------

        //event is raised when the cash report button is clicked
        private void ctlMainClickCashReport()
        {
            Boolean  appliedOptions = false;
            DateTime dateFrom       = DateTime.Parse(_dentalManager.ServerDateTime);
            DateTime dateTo         = DateTime.Parse(_dentalManager.ServerDateTime);

            this.Cursor = Cursors.WaitCursor;

            using (DentalLib.ReportOptionsCashReport frmOptions = new DentalLib.ReportOptionsCashReport(
                       dateFrom, dateTo))
            {
                frmOptions.ShowDialog(this);

                if (frmOptions.ApplyOptions)
                {
                    appliedOptions = frmOptions.ApplyOptions;
                    dateFrom       = frmOptions.DateFrom;
                    dateTo         = frmOptions.DateTo;
                }
            }

            this.Cursor = Cursors.Arrow;

            if (appliedOptions)
            {
                this.Cursor = Cursors.WaitCursor;

                using (DentalLib.ReportsCashReport frmReport = new DentalLib.ReportsCashReport(_userInfo, dateFrom, dateTo))
                {
                    frmReport.ShowDialog(this);
                }

                this.Cursor = Cursors.Arrow;
            }
        } //-------------------------------
Пример #2
0
        } //-----------------------------------

        //##################################END CLASS ReportsCashReport EVENTS##############################################

        //##############################################LINKBUTTON lnkChange EVENTS##########################################################
        //event is raised when the link button is clicked
        protected override void lnkChangeLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Boolean appliedOptions = false;

            using (DentalLib.ReportOptionsCashReport frmOptions = new DentalLib.ReportOptionsCashReport(_dateFrom, _dateTo))
            {
                frmOptions.ShowDialog(this);

                if (frmOptions.ApplyOptions)
                {
                    appliedOptions = frmOptions.ApplyOptions;
                    _dateFrom      = frmOptions.DateFrom;
                    _dateTo        = frmOptions.DateTo;

                    this.SetReportData();
                }
            }
        } //--------------------------------