Exemplo n.º 1
0
 List <Fas_Depo_Test_Result> Loads()
 {
     using (FASEntities Con = new FASEntities())
     {
         var inq = new int[] { 41849,
                               42891,
                               43575,
                               43575,
                               43575,
                               43575,
                               44114,
                               42983,
                               42335,
                               47192,
                               19438,
                               42928,
                               42369,
                               44972,
                               36102,
                               44165,
                               44891,
                               03702,
                               03686,
                               03685 };
         return((from i in Con.Fas_Depo_Test_Result
                 where (inq.Contains(i.SN))
                 select i).ToList());
     }
 }
Exemplo n.º 2
0
 bool Check(int SN)
 {
     using (FASEntities Con = new FASEntities())
     {
         return(Con.Fas_Depo_Test_Result.Where(c => c.SN == SN).Select(c => c.SN == SN).FirstOrDefault());
     }
 }
Exemplo n.º 3
0
 List <Fas_Depo_Test_Result> Loads(int start, int end)
 {
     using (FASEntities Con = new FASEntities())
     {
         return((from i in Con.Fas_Depo_Test_Result
                 where (i.SN <= start && i.SN >= end)
                 select i).ToList());
     }
 }
Exemplo n.º 4
0
 void Update(int SN, string FullName, byte[] Byte)
 {
     using (FASEntities Con = new FASEntities())
     {
         var _count = Con.Fas_Depo_Test_Result.Where(c => c.SN == SN).Select(c => c.Count).FirstOrDefault();
         var A      = Con.Fas_Depo_Test_Result.Where(c => c.SN == SN);
         A.FirstOrDefault().ResultFileName = FullName;
         A.FirstOrDefault().ResultData     = Byte;
         A.FirstOrDefault().RegDate        = DateTime.Now;
         A.FirstOrDefault().Count          = (Convert.ToInt32(_count) + 1).ToString();
         Con.SaveChanges();
     }
 }
Exemplo n.º 5
0
 void Add(int SN, string FullName, byte[] Byte)
 {
     using (FASEntities Con = new FASEntities())
     {
         var depo = new Fas_Depo_Test_Result()
         {
             SN             = SN,
             ResultFileName = FullName,
             ResultData     = Byte,
             RegDate        = DateTime.Now,
             Count          = "1"
         };
         Con.Fas_Depo_Test_Result.Add(depo);
         Con.SaveChanges();
     }
 }