示例#1
0
 //
 public void Insert(List <DiemDanh_NangSuatLaoDong> listAttendance)
 {
     using (var db = new DIEMDANHAPIEntities())
     {
         try
         {
             db.DiemDanh_NangSuatLaoDong.AddRange(listAttendance);
             db.SaveChanges();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
 public void Insert(int headerID)
 {
     using (var db = new DIEMDANHAPIEntities())
     {
         Header_DiemDanh_NangSuat_LaoDong_Detail header_detail = new Header_DiemDanh_NangSuat_LaoDong_Detail();
         header_detail.HeaderID = headerID;
         try
         {
             db.Header_DiemDanh_NangSuat_LaoDong_Detail.Add(header_detail);
             db.SaveChanges();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
示例#3
0
        public void Insert(Result data)
        {
            Header_DiemDanh_NangSuat_LaoDong header = new Header_DiemDanh_NangSuat_LaoDong();

            header.NgayDiemDanh  = data.dateFetching;
            header.Ca            = data.Session;
            header.Status        = data.success;
            header.Message       = data.message;
            header.VERSION       = data.VERSION;
            header.FetchDataTime = data.actualTimeFetching;
            using (var db = new DIEMDANHAPIEntities())
            {
                try
                {
                    db.Header_DiemDanh_NangSuat_LaoDong.Add(header);
                    db.SaveChanges();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }