コード例 #1
0
        protected void iEventTableList_SelectedIndexChanged(object sender, EventArgs e)
        {
            var f   = (FormView)EventDialog.FindControl("EventForm");
            var ddl = (DropDownList)f.FindControl("iEventColumnList");

            for (int i = 1; i < ddl.Items.Count; i++)
            {
                ddl.Items.RemoveAt(i);
            }
        }
コード例 #2
0
        protected void EventEditButton_Click(object sender, EventArgs e)
        {
            if (EventGridView.Rows.Count == 0)
            {
                return;
            }

            if (EventGridView.SelectedIndex != -1)
            {
                ((FormView)EventDialog.FindControl("EventForm")).ChangeMode(FormViewMode.Edit);
                EventDialog.Caption = "Редактирование события";
                EventDialog.Show(EditorMode.Edit);
            }
        }
コード例 #3
0
        protected void EventSaveHandler(object sender, EventArgs e)
        {
            var formView = EventDialog.FindControl("EventForm") as FormView;

            if (formView.CurrentMode == FormViewMode.Edit)
            {
                EventForm.UpdateItem(false);
            }
            else if (formView.CurrentMode == FormViewMode.Insert)
            {
                EventForm.InsertItem(false);
            }
            EventDialog.Close();
        }
コード例 #4
0
 protected void EventAddButton_Click(object sender, EventArgs e)
 {
     ((FormView)EventDialog.FindControl("EventForm")).ChangeMode(FormViewMode.Insert);
     EventDialog.Caption = "Создание события";
     EventDialog.Show(EditorMode.Insert);
 }