protected void uiButtonSave_Click(object sender, EventArgs e)
        {
            Schedule objdata = new Schedule();
            if (CurrentSchedule == null)
            {
                objdata.AddNew();
                objdata.CreatedBy = new Guid(Membership.GetUser().ProviderUserKey.ToString());
                objdata.CreatedDate = DateTime.Now;
            }
            else
                objdata = CurrentSchedule;
            objdata.Name = uiTextBoxTitle.Text;
            if (uiRadDatePickerStartDate.SelectedDate != null)
                objdata.StartDate = uiRadDatePickerStartDate.SelectedDate.Value;
            if (uiRadDatePickerEndDate.SelectedDate != null)
                objdata.EndDate = uiRadDatePickerEndDate.SelectedDate.Value;
            objdata.UpdatedBy = new Guid(Membership.GetUser().ProviderUserKey.ToString());
            objdata.LastUpdatedDate = DateTime.Now;

            objdata.Save();
            BindData();
            CurrentSchedule = objdata;
            uiPanelViewAll.Visible = false;
            uiPanelVersions.Visible = true;
            uiPanelEditVersions.Visible = false;
            uiPanelEdit.Visible = true;

            // add new notifications

            SendingNotifications.sendNotif(8, null, null, null, null, null, CurrentSchedule.ScheduleID, null);

            /*ManualCategory cat = new ManualCategory();
            cat.GetTopMostParent(CurrentSchedule.ManualCategoryID);

            if (CurrentSchedule.ManualCategoryID == 12)
            {
                SendingNotifications.sendNotif(5, CurrentSchedule.ManualCategoryID, CurrentSchedule.ManualID, null, null, null);
            }
            else
            {
                if (!cat.IsColumnNull(ManualCategory.ColumnNames.ParentCategoryID))
                {
                    if (cat.ParentCategoryID != 12)
                        SendingNotifications.sendNotif(3, CurrentSchedule.ManualCategoryID, CurrentSchedule.ManualID, null, null, null);
                    else
                        SendingNotifications.sendNotif(5, CurrentSchedule.ManualCategoryID, CurrentSchedule.ManualID, null, null, null);
                }
                else
                    SendingNotifications.sendNotif(3, CurrentSchedule.ManualCategoryID, CurrentSchedule.ManualID, null, null, null);
            }*/
            //ClearFields();
        }