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); }
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(); } }
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; } } }
public void removeFutureData([FromBody] CFutureData futureData) { BFutureDataManager.removeFutureData(futureData); }
public void updateFutureData([FromBody] CFutureData futureData) { BFutureDataManager.updateFutureData(futureData); }
public void addFutureData([FromBody] CFutureData futureData) { BFutureDataManager.addFutureData(futureData); }
public static void updateFutureData(CFutureData cf) { DFutureDataManager.updateFutureData(cf); }
public static void removeFutureData(CFutureData cf) { DFutureDataManager.removeFutureData(cf.IdChild); }
public static void addFutureData(CFutureData cf) { DFutureDataManager.addFutureData(cf); }