Exemplo n.º 1
0
        protected void ShowCurrentDelegate()
        {
            MultiView1.ActiveViewIndex = 0;
            string          currentdep               = DisbursementLogic.GetCurrentDep();
            DDelegateDetail currentdelegate          = RequisitionLogic.GetLatestDelegate(currentdep);
            string          currentdelegatename      = RequisitionLogic.GetDelegateName(currentdelegate);
            DateTime        currentdelegatestartdate = RequisitionLogic.GetDelegateStartDate(currentdelegate);
            DateTime        currentdelegateenddate   = RequisitionLogic.GetDelegateEndDate(currentdelegate);

            LblCurrentDelegate.Text     = currentdelegatename;
            LblCurrentDelStartDate.Text = currentdelegatestartdate.ToShortDateString();
            LblCurrentDelEndDate.Text   = currentdelegateenddate.ToShortDateString();
        }
Exemplo n.º 2
0
        protected void BtnEdit_Click(object sender, EventArgs e)
        {
            statusMessage.Visible      = false;
            MultiView1.ActiveViewIndex = 1;
            string          currentdep               = DisbursementLogic.GetCurrentDep();
            DDelegateDetail currentdelegate          = RequisitionLogic.GetLatestDelegate(currentdep);
            string          currentdelegatename      = RequisitionLogic.GetDelegateName(currentdelegate);
            DateTime        currentdelegatestartdate = RequisitionLogic.GetDelegateStartDate(currentdelegate);
            DateTime        currentdelegateenddate   = RequisitionLogic.GetDelegateEndDate(currentdelegate);

            CalStartEditDelegate.TodaysDate   = currentdelegatestartdate;
            CalEndEditDelegate.TodaysDate     = currentdelegateenddate;
            CalStartEditDelegate.SelectedDate = CalStartEditDelegate.TodaysDate;
            CalEndEditDelegate.SelectedDate   = CalEndEditDelegate.TodaysDate;
            LblCurrentDelegateView2.Text      = currentdelegatename;
            if (CalStartEditDelegate.SelectedDate < DateTime.Today)
            {
                CalStartEditDelegate.Enabled = false;
            }
        }