Example #1
0
        protected void CancelUpdate(WMSDcDataContext dc)
        {
            ChangeSet ch = dc.GetChangeSet();

            foreach (Object up in ch.Updates)
            {
                dc.Refresh(RefreshMode.OverwriteCurrentValues, up);
            }
        }
Example #2
0
        protected void CancelDeleteAndInsert(WMSDcDataContext dc)
        {
            ChangeSet ch = dc.GetChangeSet();

            foreach (Object ins in ch.Inserts)
            {
                dc.GetTable(ins.GetType()).DeleteOnSubmit(ins);
            }

            foreach (Object del in ch.Deletes)
            {
                dc.GetTable(del.GetType()).InsertOnSubmit(del);
            }
        }