partial void DeleteVidioNews(VidioNews instance);
partial void UpdateVidioNews(VidioNews instance);
partial void InsertVidioNews(VidioNews instance);
private SB.VidioNews Convert(VidioNews vInfo) { SB.VidioNews v = new ShareMan.SB.VidioNews { ID = vInfo.ID, Context = vInfo.Context }; return v; }
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; } }
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; }