public Timeline updateTimeLineToSQL(Timeline timeline) { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); var result = db.Timelines.Find(timeline); if (result == null) { return(null); } if (result != null) { result.exitTime = DateTime.Today; } db.SaveChanges(); return(timeline); } catch (Exception ex) { throw new Exception(ex.Message); } }
public List <Business> GetAllBusinessFromDal() { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); List <Business> bussinessList = db.Businesses.ToList(); return(bussinessList); } catch (Exception ex) { throw new Exception(ex.Message); } }
public List<BusinessUser> GetAllBusinessUsersFromDal() { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); List<BusinessUser> BusinessUserList = db.BusinessUsers.ToList(); return BusinessUserList; } catch (Exception ex) { throw new Exception(ex.Message); } }
public List <Timeline> GetAllTimeLineFromDal() { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); List <Timeline> timeLineList = db.Timelines.ToList(); return(timeLineList); } catch (Exception ex) { throw new Exception(ex.Message); } }
public List <Customer> GetAllCustomersFromDal() { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); List <Customer> CustomersList = db.Customers.ToList(); return(CustomersList); } catch (Exception ex) { throw new Exception(ex.Message); } }
public Business addBusinessToSQL(Business business) { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); db.Businesses.Add(business); db.SaveChanges(); return(business); } catch (Exception ex) { throw new Exception(ex.Message); } }
public QRCodeEncoder GetBusinessCoder(string urlBusiness) { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); // db.Filter=@"JPEG files|*.jpg;*.jpeg"; MessagingToolkit.QRCode.Codec.QRCodeEncoder encoder = new MessagingToolkit.QRCode.Codec.QRCodeEncoder(); encoder.QRCodeScale = 8; return(encoder); } catch (Exception ex) { throw new Exception(ex.Message); } }
public BusinessUser addBusinessuserToSQL(BusinessUser businessUser) { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); db.BusinessUsers.Add(businessUser); db.SaveChanges(); return businessUser; } catch (Exception ex) { throw new Exception(ex.Message); } }
public Timeline addTimeLineToSQL(Timeline timeline) { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); db.Timelines.Add(timeline); db.SaveChanges(); return(timeline); } catch (Exception ex) { throw new Exception(ex.Message); } }
public Customer addCusstomerToSQL(Customer customer) { try { PurpleBadgeEntities db = new PurpleBadgeEntities(); db.Customers.Add(customer); db.SaveChanges(); return(customer); } catch (Exception ex) { throw new Exception(ex.Message); } }