public void Create(BussinesManager bussines)
        {
            try
            {
                Address a = crudAddress.Retrieve <Address>(bussines);
                bussines.Id_Address = a.Id;
                var c = crudBussines.Retrieve <BussinesManager>(bussines);

                if (c != null)
                {
                    //BussinesManager  already exist
                    throw new BussinessException(1);
                }

                else
                {
                    bussines.Id_Address = a.Id;
                    crudBussines.Create(bussines);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.GetInstance().Process(ex);
            }
        }
Beispiel #2
0
 public void Create(SellerStore seller)
 {
     try
     {
         Address a = crudAddress.Retrieve <Address>(seller);
         seller.ID_Address = a.Id;
         var s = crudSeller.Retrieve <SellerStore>(seller);
         if (s != null)
         {
             //SellerStore already exist
             throw new BussinessException(3);
         }
         else
         {
             seller.ID_Address = a.Id;
             crudSeller.Create(seller);
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.GetInstance().Process(ex);
     }
 }