public SELLERS AuthenticateSeller(string email, string password) { SELLERS seller = SELLERSDAL.Get(email); if (seller.EMAIL == email && seller.PASSWORD == password) { return(seller); } else { return(null); } }
//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); }
//6 delete customer public static bool DeleteSeller(int sellerId) => SELLERSDAL.DeleteSeller(sellerId);
// 5 update customer public static bool UpdateSeller(SELLERS seller) => SELLERSDAL.UpdateSeller(seller);
//4 insert customer public static bool InsertSeller(SELLERS seller) => SELLERSDAL.InsertSeller(seller);
//3 getAll SELLERS public static List <SELLERS> GetSellers() => SELLERSDAL.GetAll();
//2 get customer details using email public static SELLERS GetSeller(string sellerEmail) => SELLERSDAL.Get(sellerEmail);
//crudoperations //1 get customer details using name public static SELLERS GetSeller(int sellerId) => SELLERSDAL.Get(sellerId);