Exemple #1
0
 public void UpdateAnhGiaoVien(DataTable dtSinhVien, string ThuMucAnh)
 {
     Image img;
     byte[] Anh;
     foreach (DataRow dr in dtSinhVien.Rows)
     {
         if ("" + dr["FileAnh"] != "")
         {
             MemoryStream ms = new MemoryStream();
             img = Image.FromFile(ThuMucAnh + dr["FileAnh"].ToString());
             img.Save(ms, img.RawFormat);
             Anh = ms.GetBuffer();
             oDNS_GiaoVien.UpdateAnhGiaoVien(Anh, int.Parse(dr["NS_GiaoVienID"].ToString()));
         }
     }
 }