예제 #1
0
 private void UserTasksListToolStripMenuItem_Click(object sender, EventArgs e)
 {
     flag = "";
     using (var fs = new FormSelect(this, flag))
     {
         if (fs.ShowDialog() == DialogResult.OK)
         {
             return;
         }
     }
 }
예제 #2
0
    private void SelectSubject()
    {
        FormSelect formSelect = new FormSelect(SubjectsTable);

        formSelect.ItemSelected += (sender, e) => Subject =
            e.SelectedRows[0] as CollegeDataSet.SubjectsRow;
        formSelect.DataGrid.Columns[0].Visible    = false;
        formSelect.DataGrid.Columns[1].HeaderText = "Наименование дисциплины";

        formSelect.ShowDialog();
    }
예제 #3
0
        private void buttonAddProperty_Click(object sender, EventArgs e)
        {
            FormSelect <Property> form = new FormSelect <Property>("Property", possibleProperties, p => p.Name);

            var      result   = form.ShowDialog(this);
            Property property = form.SelectedColumn;

            if (result == DialogResult.OK && property != null)
            {
                AddNewProperty.RaiseEventEx(this, new GenericEventArgs <Property>(property));
            }
        }
예제 #4
0
    private void ButtonChangeGroupClickHandler(object sender, EventArgs e)
    {
        if (College == null || GroupTypeId == -1)
        {
            return;
        }

        var form = new FormSelect(College.GetGroupsByGroupTypeId(GroupTypeId));

        form.DataGrid.MultiSelect                       = false;
        form.ItemSelected                              += (sender2, e2) =>
                                              GroupInfo = e2.SelectedRows[0] as CollegeDataSet.GroupsRow;
        form.DataGrid.Columns[0].Visible                = false;
        form.DataGrid.Columns[2].Visible                = false;
        form.DataGrid.Columns[1].HeaderText             = "Наименование группы";

        form.ShowDialog();
    }
예제 #5
0
        private void ButtonOKClickHandler(object sender, EventArgs e)
        {
            var groupsTable = m_radioGroupPlan.Checked ?
                              m_college.GetGroupsByGroupTypeId(m_groupTypeId) :
                              m_college.GetPlanNamesByGroupTypeId(m_groupTypeId);
            var form = new FormSelect(groupsTable);

            form.DataGrid.MultiSelect = false;
            form.ItemSelected        += (sender2, e2) =>
            {
                GroupIdForCopy = ((CollegeDataSet.GroupsRow)e2.SelectedRows[0]).group_id;
                Close();
            };
            form.DataGrid.Columns[0].Visible    = false;
            form.DataGrid.Columns[2].Visible    = false;
            form.DataGrid.Columns[1].HeaderText = m_radioGroupPlan.Checked ?
                                                  "Наименование группы" : "Наименование плана";
            form.ShowDialog();
        }
예제 #6
0
        private void buttonAddProperty_Click(object sender, EventArgs e)
        {
            FormSelect<Property> form = new FormSelect<Property>("Property", possibleProperties, p => p.Name);

            var result = form.ShowDialog(this);
            Property property = form.SelectedColumn;

            if(result == DialogResult.OK && property != null)
            {
                AddNewProperty.RaiseEventEx(this, new GenericEventArgs<Property>(property));
            }
        }