示例#1
0
 public int InsertDailyMenuDetail(DailyMenuDetail entity)
 {
     dailyMenuDetails = db.GetTable <DailyMenuDetail>();
     dailyMenuDetails.InsertOnSubmit(entity);
     db.SubmitChanges();
     return(1);
 }
示例#2
0
        public bool Insert(ReceivableDetail_Student entity)
        {
            ReceivableDetail_Student a = new ReceivableDetail_Student();

            a.ReceivableDetailID = entity.ReceivableDetailID;
            a.StudentID          = entity.StudentID;
            a.Status             = entity.Status;
            dt.ReceivableDetail_Students.InsertOnSubmit(a);
            dt.SubmitChanges();
            return(true);
        }
示例#3
0
        public bool Insert(Preferred entity)
        {
            Preferred a = new Preferred();

            a.Name    = entity.Name;
            a.Status  = entity.Status;
            a.Percent = entity.Percent;
            dt.Preferreds.InsertOnSubmit(a);
            dt.SubmitChanges();
            return(true);
        }
示例#4
0
        public int Insert(DishDetail entity, int dishID)
        {
            DishDetail dishDetail = new DishDetail();

            dishDetail.DishID        = dishID;
            dishDetail.IngredientID  = entity.IngredientID;
            dishDetail.QuantiyOfUnit = entity.QuantiyOfUnit;
            dishDetail.Status        = entity.Status;
            dishDetails.InsertOnSubmit(dishDetail);
            db.SubmitChanges();
            return(dishDetail.DishDetailID);
        }
示例#5
0
        public bool Insert(SpendSpecy entity)
        {
            SpendSpecy a = new SpendSpecy();

            a.Name        = entity.Name;
            a.CreatedDate = entity.CreatedDate;
            a.Note        = entity.Note;
            a.Status      = true;
            dt.SpendSpecies.InsertOnSubmit(a);
            dt.SubmitChanges();
            return(true);
        }
示例#6
0
        public bool PhysicalInsert(PhysicalAssessment entity)
        {
            PhysicalAssessment a = new PhysicalAssessment();

            a.Date   = entity.Date;
            a.Status = entity.Status;
            a.Name   = entity.Name;
            a.Note   = entity.Note;
            db.PhysicalAssessments.InsertOnSubmit(a);
            db.SubmitChanges();
            return(true);
        }
示例#7
0
        public int Insert(Order order)
        {
            Order a = new Order();

            a.OrderName  = order.OrderName;
            a.Date       = order.Date;
            a.EmployeeID = order.EmployeeID;
            a.Status     = order.Status;
            dt.Orders.InsertOnSubmit(a);
            dt.SubmitChanges();
            return(a.OrderID);
        }
示例#8
0
 public int Insert(Topic entity)
 {
     try
     {
         topics.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.TopicID);
     }
     catch
     {
         return(0);
     }
 }
示例#9
0
 public int InsertDailyTrackerDrugTime(DailyTrackerDrugTime entity)
 {
     try
     {
         dailyTrackerDrugTimes.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.DailyTrackerDrugTimeID);
     }
     catch
     {
         return(0);
     }
 }
示例#10
0
 public bool InsertClass(Class entity)
 {
     try
     {
         ClassTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#11
0
 public int Insert(DailyTracker entity)
 {
     try
     {
         dailyTrackers.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.DailyTrackerID);
     }
     catch
     {
         return(0);
     }
 }
示例#12
0
 public bool Insert(Semester entity)
 {
     try
     {
         semesters.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#13
0
 public int Insert(Ingredient entity)
 {
     try
     {
         ingredients.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.IngredientID);
     }
     catch
     {
         return(0);
     }
 }
示例#14
0
 public int Insert(Division entity)
 {
     try
     {
         divisions.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.DivisionID);
     }
     catch
     {
         return(0);
     }
 }
示例#15
0
 public int Insert(Meal entity)
 {
     try
     {
         meals.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.MealID);
     }
     catch
     {
         return(0);
     }
 }
示例#16
0
 public int Insert(AgeGroup entity)
 {
     try
     {
         AgeGroups.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.AgeGroupID);
     }
     catch
     {
         return(0);
     }
 }
示例#17
0
 public int Insert(DishDetail entity)
 {
     try
     {
         dishDetails.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.DishDetailID);
     }
     catch
     {
         return(0);
     }
 }
示例#18
0
 public int Insert(Lesson entity)
 {
     try
     {
         lessons.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.LessonID);
     }
     catch
     {
         return(0);
     }
 }
示例#19
0
 public bool StudentClassInsert(Student_Class entity)
 {
     try
     {
         StudentClassTable = db.GetTable <Student_Class>();
         StudentClassTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#20
0
 public int Insert(Grade entity)
 {
     try
     {
         grade.InsertOnSubmit(entity);
         db.SubmitChanges();
         //Insert History
         return(entity.GradeID);
     }
     catch
     {
         return(0);
     }
 }
示例#21
0
 public bool PhysicalInsert(PhysicalAssessment entity)
 {
     try
     {
         PhysicalTable = db.GetTable <PhysicalAssessment>();
         PhysicalTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#22
0
 public bool Insert(Employee entity)
 {
     try
     {
         employee = db.GetTable <Employee>();
         employee.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#23
0
 public bool Insert(Department entity)
 {
     try
     {
         department.InsertOnSubmit(entity);
         db.SubmitChanges();
         new HistoryDAO().Insert(QLHSBanTru2018_Demo_V1.Common.LoginDetail.LoginID, 5, "Thêm phòng ban " + entity.Name);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#24
0
 public bool HealthProblemInsert(HealthProblem entity)
 {
     try
     {
         HealthProblemTable = db.GetTable <HealthProblem>();
         HealthProblemTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#25
0
 public bool HealthExamInsert(HealthExamination entity)
 {
     try
     {
         HealthExamTable = db.GetTable <HealthExamination>();
         HealthExamTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#26
0
 public int StudentInsert(Student entity)
 {
     try
     {
         StudentTable = db.GetTable <Student>();
         StudentTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(entity.StudentID);
     }
     catch
     {
         return(0);
     }
 }
示例#27
0
 public int Insert(Course entity)
 {
     try
     {
         course.InsertOnSubmit(entity);
         db.SubmitChanges();
         //History
         return(entity.CourseID);
     }
     catch
     {
         return(0);
     }
 }
示例#28
0
 public bool ParentsInsert(StudentParent entity)
 {
     try
     {
         StudentParentsTable = db.GetTable <StudentParent>();
         StudentParentsTable.InsertOnSubmit(entity);
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#29
0
 public bool Insert(Position entity)
 {
     try
     {
         position.InsertOnSubmit(entity);
         db.SubmitChanges();
         //History
         return(true);
     }
     catch
     {
         return(false);
     }
 }
        public bool HealthDetailInsert(HealthExaminationDetail entity)
        {
            HealthExaminationDetail a = new HealthExaminationDetail();

            a.HealthExaminationID = entity.HealthExaminationID;
            a.StudentID           = entity.StudentID;
            a.HealthInsurance     = entity.HealthInsurance;
            a.Status = false;
            a.Height = entity.Height;
            a.Weight = entity.Weight;
            a.Rating = entity.Rating;
            db.HealthExaminationDetails.InsertOnSubmit(a);
            db.SubmitChanges();
            return(true);
        }