Exemplo n.º 1
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.º 2
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();
     }
 }