示例#1
0
 public ActivityORGInfo()
 {
     if (string.IsNullOrEmpty(Guid))
     {
         Guid = System.Guid.NewGuid().ToString();
     }
     Securityclass = new IdentifiableData <string>();
 }
        /// <summary>
        /// 创建ActivityEquipmentInfo对象
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="orginfo"></param>
        /// <param name="businesscode"></param>
        /// <returns></returns>
        private List <ActivityEquipmentInfo> CreateActivityEquipments(DataTable dt, ActivityORGInfo orginfo, string businesscode)
        {
            List <ActivityEquipmentInfo> equs = new List <ActivityEquipmentInfo>();

            if (dt != null && dt.Rows.Count > 0)
            {
                StringBuilder errorMsg = new StringBuilder();

                #region

                for (int i = 1; i < dt.Rows.Count; i++)
                {
                    DataRow dr = dt.Rows[i];
                    if (string.IsNullOrEmpty(dr[0].ToString()))
                    {
                        continue;
                    }

                    ActivityEquipmentInfo equ = new ActivityEquipmentInfo();
                    equ.GUID         = System.Guid.NewGuid().ToString();
                    equ.ActivityGuid = Client.RiasPortal.ModuleContainer.Activity.Guid;
                    equ.PlaceGuid    = activityPlaceInfo.Guid;;
                    equ.ORGGuid      = orginfo.Guid;
                    equ.Origin       = 3;
                    IdentifiableData <string> org = new IdentifiableData <string>();
                    org.Guid         = orginfo.Guid;
                    org.Name         = orginfo.Name;
                    equ.ORG          = org;
                    equ.Name         = dr[0].ToString();
                    equ.BusinessCode = businesscode;
                    equ.EQUCount     = Int32.Parse(dr[1].ToString()); //设备数量
                    equ.EquModel     = dr[2].ToString();              //设备型号
                    equ.EquNo        = dr[3].ToString();              //设备编号
                    equ.Remark       = dr[4].ToString();              //备注
                    equ.IsStation    = false;
                    equ.StationName  = string.Empty;
                    equ.IsMobile     = false;

                    equ.SendFreq      = string.IsNullOrEmpty(dr[5].ToString()) ? double.NaN : double.Parse(dr[5].ToString());
                    equ.ReceiveFreq   = string.IsNullOrEmpty(dr[6].ToString()) ? double.NaN : double.Parse(dr[6].ToString());   //接收频率
                    equ.IsTunAble     = dr[7].ToString() == "是" ? true : false;                                                 //频率可调
                    equ.SendFreqStart = string.IsNullOrEmpty(dr[8].ToString()) ? double.NaN : double.Parse(dr[8].ToString());   //发射频率范围起始
                    equ.SendFreqEnd   = string.IsNullOrEmpty(dr[9].ToString()) ? double.NaN : double.Parse(dr[9].ToString());   //发射频率范围终止
                    equ.Band          = string.IsNullOrEmpty(dr[10].ToString()) ? double.NaN : double.Parse(dr[10].ToString()); //带宽
                    equ.MaxPower      = string.IsNullOrEmpty(dr[11].ToString()) ? double.NaN : double.Parse(dr[11].ToString()); //发射功率

                    EMCS.Types.EMCModulationEnum modulat;
                    if (Enum.TryParse(dr[12].ToString(), out modulat))
                    {
                        equ.ModulateMode = modulat;
                    }

                    //发射天线
                    //equ.SendPara.Ant.Guid = System.Guid.NewGuid().ToString();

                    //equ.SendPara.Ant.AntType = dr[13].ToString();//天线类型
                    equ.SendAntModel = dr[14].ToString();                                                                      //天线型号
                    equ.SendAntGain  = string.IsNullOrEmpty(dr[15].ToString()) ? double.NaN : double.Parse(dr[15].ToString()); //天线增益
                    EMCS.Types.EMCPolarisationEnum sendpolar;
                    if (Enum.TryParse(dr[16].ToString(), out sendpolar))                                                       //极化方式
                    {
                        equ.SendAntPolar = sendpolar;
                    }
                    equ.SendAntHeight   = double.Parse(dr[17].ToString()); //天线高度
                    equ.SendAntFeedLoss = double.Parse(dr[18].ToString()); //馈线损耗


                    //接收
                    equ.RecvFreqStart = string.IsNullOrEmpty(dr[19].ToString()) ? double.NaN : double.Parse(dr[19].ToString()); //接收频率范围起始
                    equ.RecvFreqEnd   = string.IsNullOrEmpty(dr[20].ToString()) ? double.NaN : double.Parse(dr[20].ToString()); //接收频率范围终止
                    //equ.RecivePara.Ant.Guid = System.Guid.NewGuid().ToString();
                    //equ.RecivePara.Ant.AntType = dr[21].ToString();//天线类型
                    equ.RecvAntModel = dr[22].ToString();                                                                      //天线型号
                    equ.RecvAntGain  = string.IsNullOrEmpty(dr[23].ToString()) ? double.NaN : double.Parse(dr[23].ToString()); //天线增益
                    EMCS.Types.EMCPolarisationEnum recpolar;
                    if (Enum.TryParse(dr[24].ToString(), out recpolar))                                                        //极化方式
                    {
                        equ.RecvAntPolar = recpolar;
                    }
                    equ.RecvAntHeight   = string.IsNullOrEmpty(dr[25].ToString()) ? double.NaN : double.Parse(dr[25].ToString()); //天线高度
                    equ.RecvAntFeedLoss = string.IsNullOrEmpty(dr[26].ToString()) ? double.NaN : double.Parse(dr[26].ToString()); //馈线损耗

                    equs.Add(equ);
                }

                #endregion
            }
            return(equs);
        }
示例#3
0
 public WorkFileInfo()
 {
     Catalog     = new IdentifiableData <string>();
     Attachments = new List <FileAttachment>();
     IssueDate   = DateTime.Now.Date;
 }
示例#4
0
 public Equipment()
 {
     FreqRange = new Range <double?>();
     OrgInfo   = new IdentifiableData <string>();
 }