public void DeleteData(ModelNotifiedForOrderDetails modelNotifiedForOrderDetails, out string error) { OrderDetailsBsn bsn = new OrderDetailsBsn(wpfConfig); OrderDetailsInfo dbItem = new OrderDetailsInfo(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails, typeof(OrderDetailsInfo), dbItem); bsn.DeleteByID(dbItem, out error); }
public void DeleteData(ModelNotifiedForOrderDetails modelNotifiedForOrderDetails, out string error) { OrderDetailsGenericREST OrderDetailsGenericREST = new OrderDetailsGenericREST(wpfConfig); DeleteOrderDetailsView deleteOrderDetailsView = new DeleteOrderDetailsView(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails, typeof(DeleteOrderDetailsView), deleteOrderDetailsView); OrderDetailsGenericREST.Delete(deleteOrderDetailsView, out error); }
public void AddData(ModelNotifiedForOrderDetails modelNotifiedForOrderDetails, out string error) { OrderDetailsGenericREST OrderDetailsGenericREST = new OrderDetailsGenericREST(wpfConfig); CreateOrderDetailsView createOrderDetailsView = new CreateOrderDetailsView(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails, typeof(CreateOrderDetailsView), createOrderDetailsView); OrderDetailsGenericREST.Insert(createOrderDetailsView, out error); }
public void SaveData(ModelNotifiedForOrderDetails modelNotifiedForOrderDetails, out string error) { OrderDetailsGenericREST OrderDetailsGenericREST = new OrderDetailsGenericREST(wpfConfig); UpdateOrderDetailsView updateOrderDetailsView = new UpdateOrderDetailsView(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails, typeof(UpdateOrderDetailsView), updateOrderDetailsView); OrderDetailsGenericREST.Update(updateOrderDetailsView, out error); }
public ModelNotifiedForOrderDetails GetOrderDetailsByID(int OrderID, int ProductID, out string error) { error = null; OrderDetailsBsn bsn = new OrderDetailsBsn(wpfConfig); OrderDetailsInfo dbItem = bsn.GetValueByID(OrderID, ProductID); ModelNotifiedForOrderDetails item = new ModelNotifiedForOrderDetails(); Cloner.CopyAllTo(typeof(OrderDetailsInfo), dbItem, typeof(ModelNotifiedForOrderDetails), item); return(item); }
public void AddData(ModelNotifiedForOrderDetails modelNotifiedForOrderDetails, out string error) { OrderDetailsBsn bsn = new OrderDetailsBsn(wpfConfig); OrderDetailsInfo dbItem = new OrderDetailsInfo(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails, typeof(OrderDetailsInfo), dbItem); bsn.InsertOne(dbItem, out error); modelNotifiedForOrderDetails.NewItem = false; Cloner.CopyAllTo(typeof(OrderDetailsInfo), dbItem, typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails); }
public ModelNotifiedForOrderDetails GetOrderDetailsByID(int OrderID, int ProductID, out string error) { error = null; OrderDetailsGenericREST OrderDetailsGenericREST = new OrderDetailsGenericREST(wpfConfig); GetOrderDetailsView getOrderDetailsView = OrderDetailsGenericREST.GetByPK <GetOrderDetailsView>(OrderID, ProductID, out error)[0]; ModelNotifiedForOrderDetails modelNotifiedForOrderDetails = new ModelNotifiedForOrderDetails(); Cloner.CopyAllTo(typeof(GetOrderDetailsView), getOrderDetailsView, typeof(ModelNotifiedForOrderDetails), modelNotifiedForOrderDetails); return(modelNotifiedForOrderDetails); }