예제 #1
0
        public SELLERS AuthenticateSeller(string email, string password)
        {
            SELLERS seller = SELLERSDAL.Get(email);

            if (seller.EMAIL == email && seller.PASSWORD == password)
            {
                return(seller);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        //special operations
        public static SELLERS SellerAllData(int id)
        {
            SELLERS seller = null;

            try
            {
                seller           = SELLERSDAL.Get(id);
                seller.ADDRESS   = SELLERSADDRESSDAL.GetAll(id);
                seller.PURCHASES = PURCHASESDDAL.GetPurchase(id);
            }
            catch (NullReferenceException nex)
            {
                seller.ADDRESS   = new List <SELLERSADDRESS>();
                seller.PURCHASES = new List <PURCHASES>();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(seller);
        }
예제 #3
0
 //6 delete customer
 public static bool DeleteSeller(int sellerId) => SELLERSDAL.DeleteSeller(sellerId);
예제 #4
0
 // 5 update customer
 public static bool UpdateSeller(SELLERS seller) => SELLERSDAL.UpdateSeller(seller);
예제 #5
0
 //4 insert customer
 public static bool InsertSeller(SELLERS seller) => SELLERSDAL.InsertSeller(seller);
예제 #6
0
 //3 getAll SELLERS
 public static List <SELLERS> GetSellers() => SELLERSDAL.GetAll();
예제 #7
0
 //2 get customer details using email
 public static SELLERS GetSeller(string sellerEmail) => SELLERSDAL.Get(sellerEmail);
예제 #8
0
        //crudoperations

        //1 get customer details using name
        public static SELLERS GetSeller(int sellerId) => SELLERSDAL.Get(sellerId);