Exemple #1
0
 public void DeliveryProduct(AEntity entity)
 {
     DataRow row;
     switch (entity.Type)
     {
         case "航母":
             row = this.BirdfarmTable.NewRow();
             row["航母简称"] = entity.Name;
             row["生产日期"] = entity.Productiondate;
             row["图像路径"] = entity.ImgName;
             this.BirdfarmTable.Rows.Add(row);
             break;
         case "舰体":
             row = this.ManSectionTable.NewRow();
             row["舰体简称"] = entity.Name;
             row["生产日期"] = entity.Productiondate;
             row["图像路径"] = entity.ImgName;
             this.ManSectionTable.Rows.Add(row);
             break;
         case "飞机":
             row = this.AirplaneTable.NewRow();
             row["飞机简称"] = entity.Name;
             row["生产日期"] = entity.Productiondate;
             row["图像路径"] = entity.ImgName;
             this.AirplaneTable.Rows.Add(row);
             break;
         case "舰炮":
             row = this.NavalGunTable.NewRow();
             row["舰炮简称"] = entity.Name;
             row["生产日期"] = entity.Productiondate;
             row["图像路径"] = entity.ImgName;
             this.NavalGunTable.Rows.Add(row);
             break;
     }
 }
Exemple #2
0
 public void updateEntity(AEntity entity)
 {
     this.beach.DeliveryProduct(entity);
 }