Exemple #1
0
 private void SelectBigAreaScheme_Load(object sender, EventArgs e)
 {
     CoScheduling.Core.DAL.BIGAREA_SCHEME dal_taskScheme = new CoScheduling.Core.DAL.BIGAREA_SCHEME();
     this.checkedListBox1.DataSource    = dal_taskScheme.GetList();
     this.checkedListBox1.DisplayMember = "SCHEMENAME";
     this.checkedListBox1.ValueMember   = "SCHEMEID";
 }
Exemple #2
0
 private void button1BigAreaSchemeOK_Click(object sender, EventArgs e)
 {
     CoScheduling.Core.Model.BIGAREA_SCHEME model = new CoScheduling.Core.Model.BIGAREA_SCHEME();
     CoScheduling.Core.DAL.BIGAREA_SCHEME   dal   = new CoScheduling.Core.DAL.BIGAREA_SCHEME();
     if (!String.IsNullOrEmpty(this.textBoxBigAreaSchemeName.Text) && (this.dateTimePickerBigAreaSchemeEndTime.Value > this.dateTimePickerBigAreaSchemeStartTime.Value))
     {
         model.SCHEMENAME  = this.textBoxBigAreaSchemeName.Text;
         model.SCHEMEBTIME = this.dateTimePickerBigAreaSchemeStartTime.Value;
         model.SCHEMEETIME = this.dateTimePickerBigAreaSchemeEndTime.Value;
         try
         {
             dal.Add(model);
             schemeid          = dal.GetLatestSchemeid();
             this.DialogResult = DialogResult.OK;
         }
         catch (System.Exception ex)
         {
             MessageBox.Show("方案添加失败,请检查数据连接!");
         }
     }
     else
     {
         MessageBox.Show("请填写有效信息!");
     }
 }
Exemple #3
0
        public void SetBigAreaSchemeSat(int SchemeID)
        {
            List <CoScheduling.Core.Model.SATELLITE_SENSOR_SELECTED> selectedSatelliteList = new List <CoScheduling.Core.Model.SATELLITE_SENSOR_SELECTED>();

            CoScheduling.Core.DAL.SATELLITE_SENSOR_SELECTED dal_selectedSatelliteList = new CoScheduling.Core.DAL.SATELLITE_SENSOR_SELECTED();

            CoScheduling.Core.DAL.BIGAREA_SATELLITE dal_satelliteList = new CoScheduling.Core.DAL.BIGAREA_SATELLITE();
            CoScheduling.Core.DAL.BIGAREA_SENSOR    dal_sensorList    = new CoScheduling.Core.DAL.BIGAREA_SENSOR();
            CoScheduling.Core.DAL.BIGAREA_ORBIT     dal_orbitList     = new CoScheduling.Core.DAL.BIGAREA_ORBIT();
            CoScheduling.Core.DAL.SatelliteOrbit    dal_orbit         = new CoScheduling.Core.DAL.SatelliteOrbit();
            CoScheduling.Core.DAL.BIGAREA_SCHEME    dal_scheme        = new CoScheduling.Core.DAL.BIGAREA_SCHEME();
            List <int> satidList = new List <int>();

            CoScheduling.Core.Model.BIGAREA_SATELLITE satelliteList = new CoScheduling.Core.Model.BIGAREA_SATELLITE();
            CoScheduling.Core.Model.BIGAREA_SENSOR    sensorList    = new CoScheduling.Core.Model.BIGAREA_SENSOR();
            CoScheduling.Core.Model.BIGAREA_ORBIT     orbitList     = new CoScheduling.Core.Model.BIGAREA_ORBIT();
            CoScheduling.Core.Model.SatelliteOrbit    orbit         = new CoScheduling.Core.Model.SatelliteOrbit();
            CoScheduling.Core.Model.BIGAREA_SCHEME    scheme        = new CoScheduling.Core.Model.BIGAREA_SCHEME();
            scheme = dal_scheme.GetModel(SchemeID);

            satidList = dal_selectedSatelliteList.GetCheckedSatID(true);
            satelliteList.SCHEMEID = SchemeID;
            sensorList.SCHEMEID    = SchemeID;
            orbitList.SCHEMEID     = SchemeID;
            foreach (int satid in satidList)
            {
                satelliteList.SATID = satid;
                dal_satelliteList.Add(satelliteList);
                orbit = dal_orbit.GetModel(satid, scheme.SCHEMEBTIME);

                orbitList.SATID                = satid;
                orbitList.SAT_ARGOFPERIGEE     = orbit.SAT_ARGOFPERIGEE;
                orbitList.SAT_BSTAR            = orbit.SAT_BSTAR;
                orbitList.SAT_ECCENTRICITY     = orbit.SAT_ECCENTRICITY;
                orbitList.SAT_INCLINATION      = orbit.SAT_INCLINATION;
                orbitList.SAT_MEANANOMALY      = orbit.SAT_MEANANOMALY;
                orbitList.SAT_MEANMOTION       = orbit.SAT_MEANMOTION;
                orbitList.SAT_MEANMOTIONDOT    = orbit.SAT_MEANMOTIONDOT;
                orbitList.SAT_MEANMOTIONDOTDOT = orbit.SAT_MEANMOTIONDOTDOT;
                orbitList.SAT_ORBITEPOCH       = orbit.SAT_ORBITEPOCH;
                orbitList.SAT_RAAN             = orbit.SAT_RAAN;
                orbitList.SAT_TLE1             = orbit.SAT_TLE1;
                orbitList.SAT_TLE2             = orbit.SAT_TLE2;
                dal_orbitList.Add(orbitList);
            }
            selectedSatelliteList = dal_selectedSatelliteList.GetCheckedList();
            foreach (CoScheduling.Core.Model.SATELLITE_SENSOR_SELECTED sensor in selectedSatelliteList)
            {
                sensorList.SATID    = sensor.SAT_ID;
                sensorList.SENSORID = sensor.SENSOR_ID;
                dal_sensorList.Add(sensorList);
            }
        }