Esempio n. 1
0
        /// <summary>
        /// 由一行数据得到一个实体,还有很多问题,什么时候用try catch,什么时候不用
        /// </summary>
        private static Model.UAV_RANGE GetModel(DbDataReader dr)
        {
            CoScheduling.Core.Model.UAV_RANGE model = new CoScheduling.Core.Model.UAV_RANGE();
            model.PLATFORM_ID      = Convert.ToDecimal(dr["PLATFORM_ID"]);
            model.PLATFORM_Name    = Convert.ToString(dr["PLATFORM_Name"]);
            model.NumberOfSensor   = Convert.ToDecimal(dr["NumberOfSensor"]);
            model.CruisingVelocity = Convert.ToDecimal(dr["CruisingVelocity"]);
            model.RollVelocity     = Convert.ToDecimal(dr["RollVelocity"]);
            model.PitchVelocity    = Convert.ToDecimal(dr["PitchVelocity"]);
            model.MaxVelocity      = Convert.ToDecimal(dr["MaxVelocity"]);
            model.MinVelocity      = Convert.ToDecimal(dr["MinVelocity"]);
            model.Acceleration     = Convert.ToDecimal(dr["Acceleration"]);
            model.CruisingTime     = Convert.ToDecimal(dr["CruisingTime"]);

            model.MaxSlewAngle     = Convert.ToDecimal(dr["MaxSlewAngle"]);
            model.MinSlewAngle     = Convert.ToDecimal(dr["MinSlewAngle"]);
            model.CruisingAltitude = Convert.ToDecimal(dr["CruisingAltitude"]);
            model.MaxAltitude      = Convert.ToDecimal(dr["MaxAltitude"]);
            model.MaxDistance      = Convert.ToDecimal(dr["MaxDistance"]);
            model.MinTurningRadius = Convert.ToDecimal(dr["MinTurningRadius"]);
            model.PayLoad          = Convert.ToDecimal(dr["PayLoad"]);
            model.MaxLoad          = Convert.ToDecimal(dr["MaxLoad"]);
            model.Base_ID          = Convert.ToDecimal(dr["Base_ID"]);
            return(model);
        }
Esempio n. 2
0
 private void UAVModify_Load(object sender, EventArgs e)
 {
     //根据无人机id获取无人机实体
     uav_range = dal_uav_range.GetModel(Convert.ToDecimal(uav_id));
     //根据获取的无人机实体,给界面控件赋值
     (this.txtPlatformID.Text)       = uav_range.PLATFORM_ID.ToString();
     this.txtPlatformName.Text       = uav_range.PLATFORM_Name;
     (this.txtNumberOfSensor.Text)   = uav_range.NumberOfSensor.ToString();
     (this.txtCruisingVelocity.Text) = uav_range.CruisingVelocity.ToString();
     this.txtRollVelocity.Text       = uav_range.RollVelocity.ToString();
     (this.txtPitchVelocity.Text)    = uav_range.PitchVelocity.ToString();
     (this.txtMaxVelocity.Text)      = uav_range.MaxVelocity.ToString();
     (this.txtMinVolocity.Text)      = uav_range.MinVelocity.ToString();
     (this.txtAcceleration.Text)     = uav_range.Acceleration.ToString();
     (this.txtCruisingTime.Text)     = uav_range.CruisingTime.ToString();
     (this.txtMaxSlewAngle.Text)     = uav_range.MaxSlewAngle.ToString();
     (this.txtMinSlewAngle.Text)     = uav_range.MinSlewAngle.ToString();
     (this.txtCruisAltitude.Text)    = uav_range.CruisingAltitude.ToString();
     (this.txtMaxAltitude.Text)      = uav_range.MaxAltitude.ToString();
     (this.txtMaxDistance.Text)      = uav_range.MaxDistance.ToString();
     (this.txtMinTurnRadius.Text)    = uav_range.MinTurningRadius.ToString();
     (this.txtPayLoad.Text)          = uav_range.PayLoad.ToString();
     (this.txtMaxLoad.Text)          = uav_range.MaxLoad.ToString();
     (this.txtBaseID.Text)           = uav_range.Base_ID.ToString();
 }
Esempio n. 3
0
 /// <summary>
 /// 给lablePLATFORM绑定卫星数据
 /// </summary>
 public void bindlablePLATFORM()
 {
     uav_range = dal_uav_range.GetModel(Convert.ToInt32(platform_id));
     this.labelPLATFORM.Text   = uav_range.PLATFORM_Name;
     this.labelPLATFORMID.Text = platform_id;
 }