public override CStatus LoadControl(k_EDIT_MODE lEditMode) { ((app_ucTimer)UCTimer).StopRefresh(); //clear the collection and items ddl ddlColItems.Items.Clear(); ddlItems.Items.Clear(); pnlMapped.Visible = false; ucNoteTitle.Visible = false; pnlComponents.Visible = false; CItemData Item = new CItemData(BaseMstr.BaseData); CItemDataItem di = null; CStatus status = Item.GetItemDI(ItemID, out di); if (!status.Status) { return(status); } ItemTypeID = di.ItemTypeID; if (di.ItemTypeID == (long)k_ITEM_TYPE_ID.Collection) { lblColl.Text = di.ItemLabel; lblCollDesc.Text = di.ItemDescription; status = CItem.LoadItemCollectionDDL( BaseMstr.BaseData, ddlColItems, ItemID); if (!status.Status) { return(status); } lblItem.Text = string.Empty; lblItemDescription.Text = string.Empty; pnlCollection.Visible = true; pnlComponents.Visible = false; ucNoteTitle.Visible = true; ucNoteTitle.Clear(); txtEntryDate.ReadOnly = true; calEntryDate.Enabled = false; ucTimePicker.Enabled = false; txtEntryDate.Text = string.Empty; calEntryDate.SelectedDate = null; ucTimePicker.SetTime(0, 0, 0); txtComment.Enabled = false; txtComment.Text = string.Empty; gvComponents.DataSource = null; gvComponents.DataBind(); gvComments.DataSource = null; gvComments.DataBind(); //hide the panels and labels for //edit until they //pick an option lblDate.Visible = false; txtEntryDate.Visible = false; ucTimePicker.Visible = false; pnlComments.Visible = false; pnlComponents.Visible = false; lblItemComps.Visible = false; lblNewComment.Visible = false; lblCommentHistory.Visible = false; txtComment.Visible = false; ucNoteTitle.Visible = false; } else { pnlCollection.Visible = false; status = LoadItemAndComponents(di); if (!status.Status) { return(status); } } return(new CStatus()); }