Exemple #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            TimeSpan time = new TimeSpan(8, 0, 0);
            DateTime d    = new DateTime(2020, 2, 23);
            DateTime d1   = new DateTime(2020, 2, 20);

            CFutureData fd = new CFutureData("888888888", 234, d, General.Statuses.Late, d1, "222222222", time, "shalom");

            BFutureDataManager.addFutureData(fd);
        }
Exemple #2
0
        public static CFutureData convertToCFuteureData(FutureData f)
        {
            CFutureData cf = new CFutureData();

            cf.IdChild          = f.IdChild;
            cf.KinderGardenCode = f.KindergardenCode;
            cf.Date             = f.Date;
            cf.Status           = StatusIntToEnum(f.Status);
            cf.UpdateDate       = f.UpdateDate;
            cf.UpdateBy         = f.UpdateBy;
            cf.Alarm            = f.Alarm;
            cf.Comments         = f.Comments;
            return(cf);
        }
        public static void updateFutureData(CFutureData CFutureData)
        {
            FutureData futureData = Mapper.convertToFutureData(selectFutureByIdChildAndDate(CFutureData.IdChild, CFutureData.Date));

            using (NDBEntities db = new NDBEntities())
            {
                futureData          = db.FutureData.First(d => d.IdChild == CFutureData.IdChild);
                futureData.Alarm    = CFutureData.Alarm;
                futureData.UpdateBy = CFutureData.UpdateBy;
                futureData.Comments = CFutureData.Comments;
                futureData.Status   = Mapper.StatusEnumToInt(CFutureData.Status);
                db.SaveChanges();
            }
        }
Exemple #4
0
        public static FutureData convertToFutureData(CFutureData cf)
        {
            FutureData f = new FutureData();

            f.IdChild          = cf.IdChild;
            f.KindergardenCode = cf.KinderGardenCode;
            f.Date             = cf.Date;
            f.Status           = StatusEnumToInt(cf.Status);
            f.UpdateDate       = cf.UpdateDate;
            f.UpdateBy         = cf.UpdateBy;
            f.Alarm            = cf.Alarm;
            f.Comments         = cf.Comments;
            return(f);
        }
        public static void addFutureData(CFutureData cf)
        {
            FutureData f = Mapper.convertToFutureData(cf);

            using (NDBEntities db = new NDBEntities())
            {
                try
                {
                    db.FutureData.Add(f);
                    db.SaveChanges();
                }
                catch (Exception)
                {
                    throw;
                }
            }
        }
Exemple #6
0
 public void removeFutureData([FromBody] CFutureData futureData)
 {
     BFutureDataManager.removeFutureData(futureData);
 }
Exemple #7
0
 public void updateFutureData([FromBody] CFutureData futureData)
 {
     BFutureDataManager.updateFutureData(futureData);
 }
Exemple #8
0
 public void addFutureData([FromBody] CFutureData futureData)
 {
     BFutureDataManager.addFutureData(futureData);
 }
Exemple #9
0
 public static void updateFutureData(CFutureData cf)
 {
     DFutureDataManager.updateFutureData(cf);
 }
Exemple #10
0
 public static void removeFutureData(CFutureData cf)
 {
     DFutureDataManager.removeFutureData(cf.IdChild);
 }
Exemple #11
0
 public static void addFutureData(CFutureData cf)
 {
     DFutureDataManager.addFutureData(cf);
 }