예제 #1
0
 public void AddHostingUnit(HostingUnit ho)
 {
     try
     {
         if (ho.Price <= 2000)
         {
             if (ho.Owner.CollectionClearance == true)
             {
                 dal.AddHostingUnit(ho);
             }
             else
             {
                 throw new Exception("can't add hosting unit because the collection clearance isn't approved");
             }
         }
         else
         {
             throw new Exception("can't add hosting unit because the price is too expensive");
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #2
0
 /// <summary>
 /// adds a new hosting unit to the data
 /// </summary>
 /// <param name="hostingUnit"></param>
 public void AddHostingUnit(HostingUnit hostingUnit)
 {
     try
     {
         dal.AddHostingUnit(hostingUnit);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public void AddHostingUnit(HostingUnit hu)
 {
     try
     {
         dal_bl.AddHostingUnit(hu);
     }
     catch (DuplicateWaitObjectException a)
     {
         throw a;
     }
 }
예제 #4
0
 public void AddHostingUnit(HostingUnit hostingUnit)
 {
     myDal.AddHostingUnit(hostingUnit.Clone());
 }
예제 #5
0
 public uint AddUnit(HostingUnitBO unit)
 {
     try { return(dal.AddHostingUnit(ConvertHostingUnitBOToDO(unit))); }
     catch (DuplicateKeyException ex) { throw ex; }
 }
예제 #6
0
 public void AddHostingUnit(HostingUnit hostingUnit)
 {
     xml.AddHostingUnit(hostingUnit);
 }