コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CalendarControlStartDate.SelectedDate = Common.CurrentClientDate(Session).AddDays(-31);
                CalendarControlEndDate.SelectedDate   = Common.CurrentClientDate(Session);
                ButtonSearch_Click(null, null);

                // get the ledger description
                if (Request.Params["Id"] != null)
                {
                    EntityKey TempKey    = new EntityKey("ModelTMSContainer.LedgerSet", "Id", Guid.Parse(Request.Params["Id"]));
                    Ledger    TempLedger = ControlObjectContext.GetObjectByKey(TempKey) as Ledger;
                    LabelObjectName.Text = TempLedger.Description;

                    // check if we are actual with material closures
                    LedgerSet.CheckLedgerClosures(ControlObjectContext, Page);
                }
                else
                { // this must be linked to the ledgerbookingcodes ...
                    EntityKey         TempKey    = new EntityKey("ModelTMSContainer.LedgerBookingCodeSet", "Id", Guid.Parse(Request.Params["LedgerBookingCodeId"]));
                    LedgerBookingCode TempLedger = ControlObjectContext.GetObjectByKey(TempKey) as LedgerBookingCode;
                    LabelObjectName.Text = TempLedger.Description;

                    // check if we are actual with material closures
                    LedgerBookingCodeSet.CheckLedgerBookingCodeClosures(ControlObjectContext, Page);
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CalendarControlStartPeriod.SelectedDate = Common.CurrentClientDate(Session).AddDays(-31);
                CalendarControlEndPeriod.SelectedDate   = Common.CurrentClientDate(Session);

                MaterialSet.CheckMaterialClosures(ControlObjectContext, Page);
                LedgerSet.CheckLedgerClosures(ControlObjectContext, Page);
                LedgerBookingCodeSet.CheckLedgerBookingCodeClosures(ControlObjectContext, Page);
            }
        }