예제 #1
0
        /// <summary>
        /// 富士I类info
        /// </summary>
        /// <param name="dr">dr</param>
        public FujiClass1Info(DataRow dr)
            : this()
        {
            this.ID = SQLUtil.ConvertInt(dr["ID"]);

            if (dr.Table.Columns.Contains("EquipmentType1ID"))
            {
                this.EquipmentType1.Code        = SQLUtil.TrimNull(dr["EquipmentType1ID"]);
                this.EquipmentType1.Description = LookupManager.GetEquipmentClassDesc(this.EquipmentType1.Code, 1);
            }

            if (dr.Table.Columns.Contains("EquipmentType1ID"))
            {
                this.EquipmentType2.Code        = SQLUtil.TrimNull(dr["EquipmentType2ID"]);
                this.EquipmentType2.Description = LookupManager.GetEquipmentClassDesc(this.EquipmentType2.Code, 2, this.EquipmentType1.Code);
            }

            this.Name        = SQLUtil.TrimNull(dr["Name"]);
            this.Description = SQLUtil.TrimNull(dr["Description"]);
            this.AddDate     = SQLUtil.ConvertDateTime(dr["AddDate"]);
            this.UpdateDate  = SQLUtil.ConvertDateTime(dr["UpdateDate"]);

            if (dr.Table.Columns.Contains("FujiClass2Count"))
            {
                this.FujiClass2Count = SQLUtil.ConvertInt(dr["FujiClass2Count"]);
            }
        }
예제 #2
0
 /// <summary>
 /// 富士类别关联信息
 /// </summary>
 /// <param name="dr">dr</param>
 public FujiClassLink(DataRow dr)
     : this()
 {
     this.FujiClass2.ID          = SQLUtil.ConvertInt(dr["ID"]);
     this.FujiClass2.Name        = SQLUtil.TrimNull(dr["Name"]);
     this.FujiClass2.Description = SQLUtil.TrimNull(dr["Description"]);
     if (dr.Table.Columns.Contains("EquipmentType1ID"))
     {
         this.EquipmentType1.Code        = SQLUtil.TrimNull(dr["EquipmentType1ID"]);
         this.EquipmentType1.Description = LookupManager.GetEquipmentClassDesc(this.EquipmentType1.Code, 1);
     }
     if (dr.Table.Columns.Contains("EquipmentType2ID"))
     {
         this.EquipmentType2.Code        = SQLUtil.TrimNull(dr["EquipmentType2ID"]);
         this.EquipmentType2.Description = LookupManager.GetEquipmentClassDesc(this.EquipmentType2.Code, 2, this.EquipmentType1.Code);
     }
     if (dr.Table.Columns.Contains("FujiClass1ID"))
     {
         this.FujiClass2.FujiClass1.ID = SQLUtil.ConvertInt(dr["FujiClass1ID"]);
     }
     if (dr.Table.Columns.Contains("FujiClass1Name"))
     {
         this.FujiClass2.FujiClass1.Name = SQLUtil.TrimNull(dr["FujiClass1Name"]);
     }
     if (dr.Table.Columns.Contains("FujiClass1Description"))
     {
         this.FujiClass2.FujiClass1.Description = SQLUtil.TrimNull(dr["FujiClass1Description"]);
     }
     if (dr.Table.Columns.Contains("FujiClass2Count"))
     {
         this.FujiClass2.FujiClass1.FujiClass2Count = SQLUtil.ConvertInt(dr["FujiClass2Count"]);
     }
     if (dr.Table.Columns.Contains("hasEdited"))
     {
         this.FujiClass2.hasEdited = SQLUtil.ConvertBoolean(dr["hasEdited"]);
     }
 }