Esempio n. 1
0
 private void RecurrenceSchedule_Updated(object sender, RecurringScheduleEventArgs e)
 {
     if (this.Updated != null)
     {
         Updated(sender, e);
     }
 }
Esempio n. 2
0
        protected void ButtonSave_Click(object sender, EventArgs e)
        {
            CancelEventArgs cancelArg = new CancelEventArgs(false);

            if (Updating != null)
            {
                Updating(this, cancelArg);
                if (cancelArg.Cancel)
                {
                    return;
                }
            }
            //OrganizationDataSet.RecurringScheduleDataTable dtRecurringSchedule = RecurringScheduleProvider.GetRecurringSchedulesByEntityId(this.OrganizationId, this.InstanceId, this.LocalEntityType, this.LocalEntityId);
            //Guid recurringScheduleId;
            //if (dtRecurringSchedule.Count > 0)
            //{
            //    recurringScheduleId = dtRecurringSchedule[0].RecurringScheduleId;
            //}
            //else
            //{
            //    recurringScheduleId = Guid.NewGuid();
            //}
            RecurringScheduleEventArgs args = new RecurringScheduleEventArgs(
                this.RecurringScheduleId,
                this.OrganizationId,
                this.InstanceId,
                this.LocalEntityType,
                this.LocalEntityId,
                this.Name,
                this.Start,
                this.End,
                this.RecurrenceRule);

            //RecurringScheduleProvider.UpdateRecurringSchedule(
            //    args.RecurringScheduleId,
            //    args.OrganizationId,
            //    args.InstanceId,
            //    args.LocalEntityType,
            //    args.LocalEntityId,
            //    args.Name,
            //    args.StartDate,
            //    args.EndDate,
            //    args.RecurrenceRule,
            //    DateTime.UtcNow,
            //    (UserContext.Current != null ? UserContext.Current.UserId : Guid.Empty),
            //    false);
            if (Updated != null)
            {
                Updated(this, args);
            }
        }