예제 #1
0
        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);
            }
        }
예제 #2
0
 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);
     }
 }
예제 #4
0
 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);
     }
 }
예제 #6
0
        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);
            }
        }
예제 #7
0
        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);
     }
 }
예제 #9
0
        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);
            }
        }