public QueryReportEduData(edu edu, query query, object data)
     : base(query, data)
 {
     this.Edu = edu;
 }
 public void SelectItem(query queryObject)
 {
     SetItemCheckState(queryObject, CheckState.Checked);
 }
 public void UnselectItem(query queryObject)
 {
     SetItemCheckState(queryObject, CheckState.Unchecked);
 }
        public void SetItemCheckState(query queryObject, CheckState state)
        {
            _isManualChecking = false;
            if (_listBoxQueries != null)
            {
                var itemIdx = _listBoxQueries.FindItem(0, true, e => e.IsFound = e.ItemValue == queryObject);
                if (itemIdx >= 0)
                {
                    _listBoxQueries.SetItemChecked(itemIdx, state == CheckState.Checked);
                    _isManualChecking = true;
                    return;
                }
            }
            if (_listBoxOtherQueries != null)
            {
                var itemIdx = _listBoxOtherQueries.FindItem(queryObject);
                if (itemIdx >= 0)
                    _listBoxOtherQueries.SetItemChecked(itemIdx, state == CheckState.Checked);
            }

            _isManualChecking = true;
        }
 public QueryReportMunicipalityData(municipality munit, query query, object data)
     : base (query, data)
 {
     this.Municipality = munit;
 }
 protected QueryReportData(query query, object data)
 {
     this.Query = query;
     this.Data = data;
 }
 public List<query> GetQueryList()
 {
     var queryList = new List<query>();
     foreach(var row in this.dataGridViewQueryParts.Rows.Cast<DataGridViewRow>())
     {
         if (row.Index == dataGridViewQueryParts.Rows.Count - 1) break;
         object titleValue = row.Cells[0].FormattedValue;
         object cellAddressValue = row.Cells[1].FormattedValue;
         if (titleValue != null && cellAddressValue != null)
         {
             var queryTtitle = string.Format("{0} {1}", this.textBoxQueryTitle.Text.Trim(), titleValue.ToString().Trim());
             var queryCellAddress = cellAddressValue.ToString().Trim();
             var query = new query()
             {
                 form = _selectedForm,
                 content = queryCellAddress,
                 title = queryTtitle.Trim()
             };
             if (!queryList.Contains(query))
                 queryList.Add(query);
         }
     }
     return queryList;
 } 
 public QueryReportRegionData(region region, query query, object data)
     : base (query, data)
 {
     this.Region = region;
 }