Example #1
0
        static void Main(string[] args)
        {
            var         op = new CustomerOperations();
            CustomerDTO c  = new CustomerDTO()
            {
                ID           = 4, Name = "XYZ",
                AddressLine1 = "0000",
                AddressLine2 = "0000"
                , State      = "000000",
                City         = "00000",
                SSNID        = 444989944,
                DOB          = DateTime.Now,
                Active       = true
            };
            long id = op.AddCustomer(c);
            //var a = op.DeleteCustomer(7);
            // AccountDTO acc = new AccountDTO() { Active = true, CustomerId = 8, Type = "Savimngs" };
            // var Aop = new AccountOperations();

            //   var a = Aop.GetActiveAccounts();
            //op.UpdateCustomer(c);

            //var Top = new TransactionOperations();
            //Top.Deposit(3, 500,"Dep");

            //Top.Withdraw(2, 500, "W");

            //Top.Transfer(2,3,1000);

            //   var x = Aop.GetAccountStatement(2,1);
        }
Example #2
0
        //Method to add new product
        public bool AddCustomer(Customer cobj)
        {
            bool result = false;

            //checking if the product object is valid
            if (Validate(cobj))
            {
                //Creating DAL class object
                CustomerOperations co = new CustomerOperations();


                //Invoking its AddProduct method
                return(co.AddCustomer(cobj));
            }
            return(result);
        }
 public void Add()
 {
     try
     {
         var isSaved = customerOperationsObj.AddCustomer(CurrentCustomer);
         LoadData();
         if (isSaved)
         {
             CustomerOperationResultMessage = "Customer has been added";
         }
         else
         {
             CustomerOperationResultMessage = "Customer has not been added";
         }
     }
     catch (Exception ex)
     {
         CustomerOperationResultMessage = ex.Message;
     }
 }
Example #4
0
 public long AddCustomer(CustomerDTO customerDTO)
 {
     return(op.AddCustomer(customerDTO));
 }
Example #5
0
 public Customer AddCustomer(Customer customer)
 {
     return(CustomerOperations.AddCustomer(customer));
 }