Example #1
0
 partial void DeleteVidioNews(VidioNews instance);
Example #2
0
 partial void UpdateVidioNews(VidioNews instance);
Example #3
0
 partial void InsertVidioNews(VidioNews instance);
Example #4
0
 private SB.VidioNews Convert(VidioNews vInfo)
 {
     SB.VidioNews v = new ShareMan.SB.VidioNews
     {
         ID = vInfo.ID,
         Context = vInfo.Context
     };
     return v;
 }
Example #5
0
 public void UpdateVidioNews(BaseItem baseInfo,VidioNews vidioInfo)
 {
     ShareManDBDataContext context = new ShareManDBDataContext();
     try
     {
         context.Connection.Open();
         context.Transaction = context.Connection.BeginTransaction();
         UpdateBase(baseInfo, context);
         var vn = from b in context.VidioNews where b.ID == baseInfo.ID select b;
         foreach (VidioNews b in vn)
         {
             b.Context = vidioInfo.Context;
         }
         context.SubmitChanges();
         context.Transaction.Commit();
     }
     catch(Exception e)
     {
         context.Transaction.Rollback();
         throw e;
     }
 }
Example #6
0
 public long CommitVidioNews(
     BaseItem baseInfo,VidioNews vidioInfo, FSM.FileSet fset,string srcIp)
 {
     ShareManDBDataContext context = new ShareManDBDataContext();
     try
     {
         context.Connection.Open();
         context.Transaction = context.Connection.BeginTransaction();
         vidioInfo.ID = CommitBase(baseInfo, ref fset,srcIp,context);
         context.VidioNews.InsertOnSubmit(vidioInfo);
         context.SubmitChanges();
         context.Transaction.Commit();
     }
     catch (System.Exception e)
     {
         context.Transaction.Rollback();
         throw e;
     }
     return baseInfo.ID;
 }