Пример #1
0
        private void SetRegionCombo()
        {
            IRegionService regSrv = ServiceFactory.GetRegionService();
              IProgramService progSrv = ServiceFactory.GetProgramService();
              RegionContainer allRegion = regSrv.RegionSelectAll();
              RegionContainer selectedRegionRegions = new RegionContainer();
              ProgramRegionContainer selectedRegion = progSrv.SelectChildrenByRegionOfProgram(CurrentID);
              for (int n = 0; n < selectedRegion.AllCount; n++)
              {
            Region region = regSrv.RegionSelect(((ProgramRegion) selectedRegion.All[n]).RegionRef);
            allRegion.Delete(allRegion[region.HashString()]);

            selectedRegionRegions.Add(region);
              }

              lstAvaiableRegion1.ValueMember = "ID";
              lstAvaiableRegion1.DisplayMember = "Name";
              lstAvaiableRegion1.Items.Clear();

              foreach (Region region in allRegion.Current.SortBy("Name"))
              {
            lstAvaiableRegion1.Items.Add(region);
              }

              lstSelectedRegion.ValueMember = "ID";
              lstSelectedRegion.DisplayMember = "Name";
              lstSelectedRegion.Items.Clear();

              foreach (Region region in selectedRegionRegions.Current.SortBy("Name"))
              {
            lstSelectedRegion.Items.Add(region);
              }

              //Ez a béna validátor kicselezése
              if (lstSelectedRegion.Items.Count > 0)
              {
            lstSelectedRegion.Text = " ";
              }
        }
Пример #2
0
 public virtual RegionContainer RegionSelectAll()
 {
     TraceCallEnterEvent.Raise();
       try
       {
     RegionContainer result;
     DataSet entitySet = m_DataContext.ndihdRegionSelectAll();
     result = new RegionContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
Пример #3
0
        private Guid RetreiveProgramData(Guid progId)
        {
            IProgramService progSrv = ServiceFactory.GetProgramService();
              Program program = progSrv.ProgramSelect(progId);
              //IOrganisationService orgSrv = ServiceFactory.GetOrganisationService();
              //Organisation org = orgSrv.OrganisationSelect(program.OrganisationRef);
              IExpertService expertSrv = ServiceFactory.GetExpertService();

              txtName.Text = program.Name;
              lblProgramCategory.Text = ((ProgramCategory) CacheCodeTables.ProgramCategories[program.ProgramCategoryRef]).Name;
              //lblOrganisation.Text = org.Name;

              if (!program.ResponsibleRef.IsNull)
              {
            Expert responsible = expertSrv.ExpertSelect(program.ResponsibleRef);
            lblResponsible.Text = responsible.NamePrefix + " " + responsible.Name;
              }
              if (!program.Coordinator1Ref.IsNull)
              {
            Expert coordinator1 = expertSrv.ExpertSelect(program.Coordinator1Ref);
            lblCoordinator1.Text = coordinator1.NamePrefix + " " + coordinator1.Name;
              }
              if (!program.Coordinator2Ref.IsNull)
              {
            Expert coordinator2 = expertSrv.ExpertSelect(program.Coordinator2Ref);
            lblCoordinator2.Text = coordinator2.NamePrefix + " " + coordinator2.Name;
              }

              cmbProgramStatus.SelectedValue = program.ProgramStatus.Trim();
              txtStartDate.Text = program.StartDate;
              txtFinishDate.Text = program.FinishDate;
              txtDescription.Text = program.Description;
              txtNonRegisteredPartners.Text = program.NonregisteredPartners;

              //Megyék
              program.Regions = progSrv.SelectChildrenByRegionOfProgram(program.ID);
              RegionContainer regions = new RegionContainer();
              for (int n = 0; n < program.Regions.AllCount; n++)
              {
            string regionID = ((ProgramRegion) program.Regions[n]).RegionRef;
            Region region = ((Region) CacheCodeTables.Regions[regionID]);
            regions.Add(region);
              }

              ArrayList sortableList = regions.All.SortBy("Name");
              lstRegion.DataSource = sortableList;
              lstRegion.DataValueField = "ID";
              lstRegion.DataTextField = "Name";
              lstRegion.DataBind();
              return program.OrganisationRef;
        }
 public virtual RegionContainer SelectChildrenByRegionSearchOfRegion(DBString RegionSearchCodeVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     RegionContainer result;
     DataSet entitySet = m_DataContext.ndihdRegionSearchOfRegionSelectBy(RegionSearchCodeVal);
     result = new RegionContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }