Ejemplo n.º 1
0
 public static int DeleteColumn(Column column)
 {
     using (DbEntities db = new DbEntities())
     {
         db.Columns.DeleteObject(column);
         //db.ObjectStateManager.ChangeObjectState(report, System.Data.EntityState.Deleted);
         return db.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public static int UpsertColumn(Column column)
 {
     using (DbEntities db = new DbEntities())
     {
         if (column.EntityKey == null)
         {
             //new column so insert
             db.Columns.AddObject(column);
             //db.ObjectStateManager.ChangeObjectState(newReport, System.Data.EntityState.Added);
         }
         else
         {
             //update report
             db.Attach(column);
             db.ObjectStateManager.ChangeObjectState(column, System.Data.EntityState.Modified);
         }
         return db.SaveChanges();
     }
 }
 /// <summary>
 /// Create a new Column object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="reportId">Initial value of the ReportId property.</param>
 /// <param name="header">Initial value of the Header property.</param>
 /// <param name="position">Initial value of the Position property.</param>
 public static Column CreateColumn(global::System.Int32 id, global::System.Int32 reportId, global::System.String header, global::System.Int32 position)
 {
     Column column = new Column();
     column.Id = id;
     column.ReportId = reportId;
     column.Header = header;
     column.Position = position;
     return column;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Columns EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToColumns(Column column)
 {
     base.AddObject("Columns", column);
 }
Ejemplo n.º 5
0
 public static void DeleteColumn(Column column)
 {
     CRUD.DeleteColumn(column);
 }
Ejemplo n.º 6
0
 public static void UpsertColumn(Column column)
 {
     CRUD.UpsertColumn(column);
 }
 public void UpsertColumn(Column column)
 {
     Business.UpsertColumn(column);
 }
 public void DeleteColumn(Column column)
 {
     Business.DeleteColumn(column);
 }