Example #1
0
        }//----------------------

        //####################################################END TEXTBOX txtExamDate EVENTS###############################################

        //####################################################TEXTBOX txtExamDate EVENTS###############################################
        //event is raised when the selected index is changed
        private void lnkChangeDateLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            DateTime eDate = DateTime.MinValue;

            if (String.IsNullOrEmpty(_majorExamScheduleInfo.ExamDate))
            {
                eDate = DateTime.Parse(_majorExamScheduleManager.ServerDateTime);
            }
            else
            {
                eDate = DateTime.Parse(_majorExamScheduleInfo.ExamDate);
            }

            using (RemoteClient.DatePicker frmPicker = new RemoteClient.DatePicker(eDate))
            {
                frmPicker.ShowDialog(this);

                if (frmPicker.HasSelectedDate)
                {
                    if (DateTime.TryParse(frmPicker.GetSelectedDate.ToLongDateString() + " " +
                                          DateTime.Parse(_majorExamScheduleManager.ServerDateTime).ToLongTimeString(), out eDate))
                    {
                        _majorExamScheduleInfo.ExamDate = eDate.ToShortDateString() + " 12:00:00 AM";
                    }

                    this.txtExamDate.Text = eDate.ToLongDateString();
                }
            }

            this.Cursor = Cursors.Arrow;
        }//-------------------------
Example #2
0
        }//----------------------

        //###########################################END BUTTON btnPrint EVENTS#####################################################

        //###########################################BUTTON lblChangeExamDate EVENTS#####################################################
        //event is raised when the control is clicked
        private void lblChangeExamDateClick(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            DateTime eDate = DateTime.Parse(_cashieringManager.ServerDateTime);

            using (RemoteClient.DatePicker frmPicker = new RemoteClient.DatePicker(eDate))
            {
                frmPicker.ShowDialog(this);

                if (frmPicker.HasSelectedDate)
                {
                    if (DateTime.TryParse(frmPicker.GetSelectedDate.ToLongDateString() + " " +
                                          DateTime.Parse(_cashieringManager.ServerDateTime).ToLongTimeString(), out eDate))
                    {
                        _editItem.SubItems[2].Text = _editedDate = eDate.ToLongDateString();

                        _cashieringManager.EditMajorExamTable(_majorExamId, _editedDate);
                    }
                }
                else
                {
                    _editedDate = String.Empty;
                }
            }

            this.Cursor = Cursors.Arrow;
        }//------------------------
Example #3
0
        }//-----------------------

        //####################################################END LINKLABEL lblBirthDate EVENTS###############################################

        //####################################################LINKLABEL lnkMarriageDate EVENTS###############################################
        //event is raised when the control is clicked
        private void lnkMarriageDateLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            DateTime mDate = DateTime.MinValue;

            if (String.IsNullOrEmpty(_personInfo.MarriageDate))
            {
                mDate = DateTime.Parse(_baseServiceManager.ServerDateTime);
            }
            else
            {
                mDate = DateTime.Parse(_personInfo.MarriageDate);
            }

            using (RemoteClient.DatePicker frmPicker = new RemoteClient.DatePicker(mDate))
            {
                frmPicker.ShowDialog(this);

                if (frmPicker.HasSelectedDate)
                {
                    if (DateTime.TryParse(frmPicker.GetSelectedDate.ToLongDateString() + " " +
                                          DateTime.Parse(_baseServiceManager.ServerDateTime).ToLongTimeString(), out mDate))
                    {
                        _personInfo.MarriageDate = mDate.ToString();
                    }

                    this.txtMarriageDate.Text = mDate.ToLongDateString();
                }
            }

            this.Cursor = Cursors.Arrow;
        }//------------------------
Example #4
0
        }//-----------------------------

        //###########################################END TEXTBOX txtRemarks EVENTS#####################################################

        //###########################################LABEL lblReceiptDate EVENTS#####################################################
        //event is raised when the control is clicked
        protected virtual void lblReceiptDateClick(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            DateTime receiptDate = DateTime.MinValue;

            if (String.IsNullOrEmpty(_canceldReceiptNoInfo.ReceiptDate))
            {
                receiptDate = DateTime.Parse(CashieringLogic.ReceiptDate);
            }
            else
            {
                receiptDate = DateTime.Parse(_canceldReceiptNoInfo.ReceiptDate);
            }

            using (RemoteClient.DatePicker frmPicker = new RemoteClient.DatePicker(receiptDate))
            {
                frmPicker.ShowDialog(this);

                if (frmPicker.HasSelectedDate)
                {
                    if (DateTime.TryParse(frmPicker.GetSelectedDate.ToLongDateString() + " " +
                                          DateTime.Parse(_cashieringManager.ServerDateTime).ToLongTimeString(), out receiptDate))
                    {
                        _canceldReceiptNoInfo.ReceiptDate = receiptDate.ToShortDateString() + " 12:00:00 AM";
                    }

                    this.lblReceiptDate.Text = receiptDate.ToLongDateString();
                }
            }

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

        //#####################################END LINKLABEL lnkReleaseDate EVENTS###########################################

        //#########################################LINKLABEL lnkMaturityDate EVENTS###########################################
        //event is raised when the link is clicked
        private void lnkMaturityDateLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            DateTime bDate = DateTime.Parse(_loanInfo.MaturityDate);

            using (RemoteClient.DatePicker frmPicker = new RemoteClient.DatePicker(bDate))
            {
                frmPicker.ShowDialog(this);

                if (frmPicker.HasSelectedDate)
                {
                    if (DateTime.TryParse(frmPicker.GetSelectedDate.ToShortDateString() + " " +
                                          DateTime.Parse(_loanManager.ServerDateTime).ToLongTimeString(), out bDate))
                    {
                        if (DateTime.Compare(bDate, DateTime.Parse(_loanInfo.ReleaseDate)) > 0)
                        {
                            _loanInfo.MaturityDate = bDate.ToString("o");
                        }
                    }

                    lblMaturityDate.Text = DateTime.Parse(_loanInfo.MaturityDate).ToLongDateString();
                }
            }

            this.Cursor = Cursors.Arrow;
        } //----------------------------------
Example #6
0
        } //-----------------------------

        //#######################################END CONTROLEMPLOYEEMANAGER ctlManager EVENTS##########################################

        //############################################LINKBUTTON lnkChange EVENTS########################################################
        //event is raised when the link is clicked
        private void lnkChangeLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            DateTime bDate = DateTime.Parse(_decManager.ServerDateTime);

            using (RemoteClient.DatePicker frmPicker = new RemoteClient.DatePicker(bDate))
            {
                frmPicker.ShowDialog(this);

                if (frmPicker.HasSelectedDate)
                {
                    if (DateTime.TryParse(frmPicker.GetSelectedDate.ToShortDateString() + " " +
                                          DateTime.Parse(_decManager.ServerDateTime).ToLongTimeString(), out bDate))
                    {
                        _decInfo.DeductionDate = bDate.ToString("o");
                    }

                    lblDate.Text = DateTime.Parse(_decInfo.DeductionDate).ToLongDateString();
                }
            }

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