Exemplo n.º 1
0
        public bool createDate(EN.Date date)
        {
            bool result = false;

            try
            {
                var datos = new DA.date()
                {
                    idClient = date.IDClient,
                    idMaper  = date.IDMaper,
                    date1    = date.DateD,
                    hour     = date.DateT,
                    status   = "En espera"
                };

                db.dates.Add(datos);
                db.SaveChanges();

                result = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Exemplo n.º 2
0
        public bool changeStatus(EN.Date date)
        {
            bool result = false;;

            try
            {
                DA.date finded_date = db.dates.Where(x => x.id == date.IDDate).FirstOrDefault();

                finded_date.status = date.Status;

                db.SaveChanges();
            }catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }