Ejemplo n.º 1
0
 public void Update(DS_Certificate Certificate)
 {
     using (var ct = new DS_CertificateDataContext(DbHelperSQL.Connection))
     {
         ct.DS_Certificate.Attach(Certificate, true);
         ct.SubmitChanges();
     }
 }
Ejemplo n.º 2
0
 public void Add(DS_Certificate Certificate)
 {
     using (var ct = new DS_CertificateDataContext(DbHelperSQL.Connection))
     {
         ct.DS_Certificate.InsertOnSubmit(Certificate);
         ct.SubmitChanges();
     }
 }
Ejemplo n.º 3
0
 public void Delete(int ID)
 {
     using (var ct = new DS_CertificateDataContext(DbHelperSQL.Connection))
     {
         DS_Certificate st      = ct.DS_Certificate.Single(a => a.ID == ID);
         string         imgpath = System.Web.HttpContext.Current.Server.MapPath(Common.Constant.WebConfig("AlbumRootPath") + DS_Members_Br.GetMemberDir(st.MemberID) + "/Certificate/");
         if (File.Exists(imgpath += st.CtfImg))
         {
             File.Delete(imgpath);
         }
         ct.DS_Certificate.DeleteOnSubmit(st);
         ct.SubmitChanges();
     }
 }