private void DSRefresh()
 {
     try
     {
         List <ControlPointTemplate> templates = DataService.SelectUserControlPointsTemplate(disciplineID, Session.GetCurrentSession().ID);
         DataSetInitializer.clbDataSetInitialize <ControlPointTemplate>(ref clbTemplates, templates, "id", "GetFormatedString");
     }
     catch (Exception ex)
     {
         logger.Error(ex);
     }
 }
 private void IntializeDataSets(uint disciplineID)
 {
     try
     {
         sumOfUsedPoints = DataService.GetSumOfPointsUsed(groupID, disciplineID);
         pointsLeft     -= sumOfUsedPoints;
         List <ControlPointTemplate> templates = DataService.SelectUserControlPointsTemplate(disciplineID, Session.GetCurrentSession().ID);
         DataSetInitializer.clbDataSetInitialize <ControlPointTemplate>(ref clbTemplates, templates, "id", "GetFormatedString");
     }
     catch (Exception ex)
     {
         logger.Error(ex);
     }
 }
Esempio n. 3
0
        private void txtGroupsFilter_TextChanged(object sender, EventArgs e)
        {
            DataSetInitializer.clbDataSetInitialize <GroupInfo>(ref clbGroups, clbGroupsDataSource, "id", "name");
            CheckAlreadyAttachedGroups(clbGroupsDataSource);
            List <GroupInfo> groups = new List <GroupInfo>();

            foreach (GroupInfo item in clbGroups.Items)
            {
                if (item.name.Contains(txtGroupsFilter.Text))
                {
                    groups.Add(item);
                }
            }
            DataSetInitializer.clbDataSetInitialize <GroupInfo>(ref clbGroups, groups, "id", "name");
            CheckAlreadyAttachedGroups(groups);
        }
Esempio n. 4
0
        private void InitializeDataSets()
        {
            try
            {
                clbGroupsDataSource = DataService.SelectAllGroupsInfo();
                DataSetInitializer.clbDataSetInitialize <GroupInfo>(ref clbGroups, clbGroupsDataSource, "id", "name");
                CheckAlreadyAttachedGroups(clbGroupsDataSource);

                List <DisciplineInfo> disciplinesInfo = DataService.SelectAllDisciplinesInfo();
                DataSetInitializer.ComboBoxDataSetInitializer <DisciplineInfo>(ref cbDisciplines, disciplinesInfo, "id", "disciplineFullName");
            }
            catch (Exception ex)
            {
                statusLabel.Text = "Возникла необработанная ошибка.";
                logger.Error(ex);
            }
        }