public DisplayObject_MCE_B_ASSETS_MT_APPLY_EN[] Query(CauseObject_MCE_B_ASSETS_MT_APPLY_EN cause, PagingParamter paging, OrderByParameter order) { if (LocalMode) { SystemLogic.Proxy.AuditQuery(cause); //平台自动生成代码 return(HelperObject_MCE_B_ASSETS_MT_APPLY_EN.Query(cause, paging, order)); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN>(ServiceUri)) { return(smgr.Service.Query(cause, paging, order)); } } }
public BizLogicMsg BatchUpdate(EntityObject_MCE_B_ASSETS_MT_APPLY_EN[] objs) { if (LocalMode) { BizLogicMsg msg = new BizLogicMsg(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { foreach (EntityObject_MCE_B_ASSETS_MT_APPLY_EN obj in objs) { SystemLogic.Proxy.AuditEdit(obj); } int amount = 0; //平台自动生成代码 foreach (EntityObject_MCE_B_ASSETS_MT_APPLY_EN obj in objs) { amount += HelperObject_MCE_B_ASSETS_MT_APPLY_EN.Update(obj, transaction); } transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); msg = new BizLogicMsg(false, expt.Message); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(msg); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN>(ServiceUri)) { return(smgr.Service.BatchUpdate(objs)); } } }
public BizLogicMsg CommitDelete(EntityObject_MCE_B_ASSETS_MT_APPLY_EN deleteBaseEntity) { if (LocalMode) { BizLogicMsg msg = new BizLogicMsg(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { //平台自动生成代码 CauseObject_ p = new CauseObject_(); p. = deleteBaseEntity.ID; HelperObject_.Delete(p, transaction); HelperObject_MCE_B_ASSETS_MT_APPLY_EN.Delete(deleteBaseEntity, transaction); transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); msg = new BizLogicMsg(false, expt.Message); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(msg); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN>(ServiceUri)) { return(smgr.Service.CommitDelete(deleteBaseEntity)); } } }
public BizLogicMsg UndoSubmit(EntityObject_MCE_B_ASSETS_MT_APPLY_EN obj) { if (LocalMode) { BizLogicMsg msg = new BizLogicMsg(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { SystemLogic.Proxy.AuditUndoSubmit(obj); int amount = HelperObject_MCE_B_ASSETS_MT_APPLY_EN.Update(obj, transaction); //平台自动生成代码 PostUndoSubmit(obj, transaction); transaction.Commit(); } catch (Exception expt) { SystemLogic.Proxy.AuditState(obj, Ipedf.Common.数据状态.已提交); transaction.Rollback(); msg = new BizLogicMsg(false, expt.Message); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(msg); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN>(ServiceUri)) { return(smgr.Service.UndoSubmit(obj)); } } }
public BizLogicMsg Delete(CauseObject_MCE_B_ASSETS_MT_APPLY_EN cause) { if (LocalMode) { BizLogicMsg msg = new BizLogicMsg(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { int amount = HelperObject_MCE_B_ASSETS_MT_APPLY_EN.Delete(cause, transaction); //平台自动生成代码 transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); msg = new BizLogicMsg(false, expt.Message); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(msg); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY_EN>(ServiceUri)) { return(smgr.Service.Delete(cause)); } } }