public EntityObject_MCE_B_ASSETS_BACK_D Load(IDbTransaction transaction, string id, out EntityObject_MCE_D_MCE_TYPE asset_type_id, out EntityObject_MCE_B_ASSETS_BACK base_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_BACK_D obj = new EntityObject_MCE_B_ASSETS_BACK_D(); //平台自动生成代码 asset_type_id = new EntityObject_MCE_D_MCE_TYPE(); base_id = new EntityObject_MCE_B_ASSETS_BACK(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_BACK_D.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.ASSET_TYPE_ID)) { asset_type_id.ID = obj.ASSET_TYPE_ID; asset_type_id = HelperObject_MCE_D_MCE_TYPE.Get(asset_type_id, transaction); } if (!string.IsNullOrEmpty(obj.BASE_ID)) { base_id.ID = obj.BASE_ID; base_id = HelperObject_MCE_B_ASSETS_BACK.Get(base_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_D_TYPE_DEPT Load(IDbTransaction transaction, string id, out EntityObject_COM_DEPART dept_id, out EntityObject_MCE_D_MCE_TYPE mce_type_id) { if (LocalMode) { EntityObject_MCE_D_TYPE_DEPT obj = new EntityObject_MCE_D_TYPE_DEPT(); //平台自动生成代码 dept_id = new EntityObject_COM_DEPART(); mce_type_id = new EntityObject_MCE_D_MCE_TYPE(); obj.ID = id; obj = HelperObject_MCE_D_TYPE_DEPT.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.DEPT_ID)) { dept_id.ID = obj.DEPT_ID; dept_id = HelperObject_COM_DEPART.Get(dept_id, transaction); } if (!string.IsNullOrEmpty(obj.MCE_TYPE_ID)) { mce_type_id.ID = obj.MCE_TYPE_ID; mce_type_id = HelperObject_MCE_D_MCE_TYPE.Get(mce_type_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_B_ASSETS_OUTSTOCK_D Load(IDbTransaction transaction, string id, out EntityObject_COM_TYPE unit_id, out EntityObject_MDM_D_DEPT prd_id, out EntityObject_MCE_D_MCE_TYPE asset_type_id, out EntityObject_COM_TYPE economic_use_type_id, out EntityObject_MCE_B_ASSETS_OUTSTOCK base_id, out EntityObject_COM_TYPE country) { if (LocalMode) { EntityObject_MCE_B_ASSETS_OUTSTOCK_D obj = new EntityObject_MCE_B_ASSETS_OUTSTOCK_D(); //平台自动生成代码 unit_id = new EntityObject_COM_TYPE(); prd_id = new EntityObject_MDM_D_DEPT(); asset_type_id = new EntityObject_MCE_D_MCE_TYPE(); economic_use_type_id = new EntityObject_COM_TYPE(); base_id = new EntityObject_MCE_B_ASSETS_OUTSTOCK(); country = new EntityObject_COM_TYPE(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_OUTSTOCK_D.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.UNIT_ID)) { unit_id.ID = obj.UNIT_ID; unit_id = HelperObject_COM_TYPE.Get(unit_id, transaction); } if (!string.IsNullOrEmpty(obj.PRD_ID)) { prd_id.ID = obj.PRD_ID; prd_id = HelperObject_MDM_D_DEPT.Get(prd_id, transaction); } if (!string.IsNullOrEmpty(obj.ASSET_TYPE_ID)) { asset_type_id.ID = obj.ASSET_TYPE_ID; asset_type_id = HelperObject_MCE_D_MCE_TYPE.Get(asset_type_id, transaction); } if (!string.IsNullOrEmpty(obj.ECONOMIC_USE_TYPE_ID)) { economic_use_type_id.ID = obj.ECONOMIC_USE_TYPE_ID; economic_use_type_id = HelperObject_COM_TYPE.Get(economic_use_type_id, transaction); } if (!string.IsNullOrEmpty(obj.BASE_ID)) { base_id.ID = obj.BASE_ID; base_id = HelperObject_MCE_B_ASSETS_OUTSTOCK.Get(base_id, transaction); } if (!string.IsNullOrEmpty(obj.COUNTRY)) { country.ID = obj.COUNTRY; country = HelperObject_COM_TYPE.Get(country, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_B_ASSETS_MT_APPLY Load(string id, out EntityObject_MDM_D_DEPT prd_id, out EntityObject_COM_USER apply_user_id, out EntityObject_COM_TYPE mtn_type_id, out EntityObject_COM_DEPART apply_dept_id, out EntityObject_COM_USER using_user_id, out EntityObject_COM_TYPE repair_result, out EntityObject_MCE_D_MCE_TYPE assets_type_id, out EntityObject_COM_TYPE emergency_degree, out EntityObject_COM_DEPART using_dept_id, out EntityObject_COM_TYPE fault_type, out EntityObject_MCE_B_ASSETS assets_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_MT_APPLY obj = new EntityObject_MCE_B_ASSETS_MT_APPLY(); //平台自动生成代码 prd_id = new EntityObject_MDM_D_DEPT(); apply_user_id = new EntityObject_COM_USER(); mtn_type_id = new EntityObject_COM_TYPE(); apply_dept_id = new EntityObject_COM_DEPART(); using_user_id = new EntityObject_COM_USER(); repair_result = new EntityObject_COM_TYPE(); assets_type_id = new EntityObject_MCE_D_MCE_TYPE(); emergency_degree = new EntityObject_COM_TYPE(); using_dept_id = new EntityObject_COM_DEPART(); fault_type = new EntityObject_COM_TYPE(); assets_id = new EntityObject_MCE_B_ASSETS(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { obj = Load(transaction, id, out prd_id, out apply_user_id, out mtn_type_id, out apply_dept_id, out using_user_id, out repair_result, out assets_type_id, out emergency_degree, out using_dept_id, out fault_type, out assets_id); transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(obj); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_MT_APPLY>(ServiceUri)) { return(smgr.Service.Load(id, out prd_id, out apply_user_id, out mtn_type_id, out apply_dept_id, out using_user_id, out repair_result, out assets_type_id, out emergency_degree, out using_dept_id, out fault_type, out assets_id)); } } }
public EntityObject_MCE_B_ASSETS_INSTOCK_D Load(string id, out EntityObject_COM_TYPE currency_id, out EntityObject_COM_TYPE country, out EntityObject_MDM_D_DEPT prd_id, out EntityObject_MCE_B_ASSETS_INSTOCK base_id, out EntityObject_MCE_D_MCE_TYPE asset_type_id, out EntityObject_MCE_D_DEPR_TYPE depr_type_id, out EntityObject_COM_TYPE unit_id, out EntityObject_COM_DEPART using_dept_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_INSTOCK_D obj = new EntityObject_MCE_B_ASSETS_INSTOCK_D(); //平台自动生成代码 currency_id = new EntityObject_COM_TYPE(); country = new EntityObject_COM_TYPE(); prd_id = new EntityObject_MDM_D_DEPT(); base_id = new EntityObject_MCE_B_ASSETS_INSTOCK(); asset_type_id = new EntityObject_MCE_D_MCE_TYPE(); depr_type_id = new EntityObject_MCE_D_DEPR_TYPE(); unit_id = new EntityObject_COM_TYPE(); using_dept_id = new EntityObject_COM_DEPART(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { obj = Load(transaction, id, out currency_id, out country, out prd_id, out base_id, out asset_type_id, out depr_type_id, out unit_id, out using_dept_id); transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(obj); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_INSTOCK_D> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_INSTOCK_D>(ServiceUri)) { return(smgr.Service.Load(id, out currency_id, out country, out prd_id, out base_id, out asset_type_id, out depr_type_id, out unit_id, out using_dept_id)); } } }
public EntityObject_MCE_B_ASSETS_PURCHASE_PLAN_D Load(IDbTransaction transaction, string id, out EntityObject_MCE_D_MCE_TYPE type_id, out EntityObject_COM_TYPE currency_id, out EntityObject_COM_TYPE unit_id, out EntityObject_MCE_B_ASSETS_PURCHASE base_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_PURCHASE_PLAN_D obj = new EntityObject_MCE_B_ASSETS_PURCHASE_PLAN_D(); //平台自动生成代码 type_id = new EntityObject_MCE_D_MCE_TYPE(); currency_id = new EntityObject_COM_TYPE(); unit_id = new EntityObject_COM_TYPE(); base_id = new EntityObject_MCE_B_ASSETS_PURCHASE(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_PURCHASE_PLAN_D.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.TYPE_ID)) { type_id.ID = obj.TYPE_ID; type_id = HelperObject_MCE_D_MCE_TYPE.Get(type_id, transaction); } if (!string.IsNullOrEmpty(obj.CURRENCY_ID)) { currency_id.ID = obj.CURRENCY_ID; currency_id = HelperObject_COM_TYPE.Get(currency_id, transaction); } if (!string.IsNullOrEmpty(obj.UNIT_ID)) { unit_id.ID = obj.UNIT_ID; unit_id = HelperObject_COM_TYPE.Get(unit_id, transaction); } if (!string.IsNullOrEmpty(obj.BASE_ID)) { base_id.ID = obj.BASE_ID; base_id = HelperObject_MCE_B_ASSETS_PURCHASE.Get(base_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_B_ASSETS_PURCHASE_PLAN_D Load(string id, out EntityObject_MCE_D_MCE_TYPE type_id, out EntityObject_COM_TYPE currency_id, out EntityObject_COM_TYPE unit_id, out EntityObject_MCE_B_ASSETS_PURCHASE base_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_PURCHASE_PLAN_D obj = new EntityObject_MCE_B_ASSETS_PURCHASE_PLAN_D(); //平台自动生成代码 type_id = new EntityObject_MCE_D_MCE_TYPE(); currency_id = new EntityObject_COM_TYPE(); unit_id = new EntityObject_COM_TYPE(); base_id = new EntityObject_MCE_B_ASSETS_PURCHASE(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { obj = Load(transaction, id, out type_id, out currency_id, out unit_id, out base_id); transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(obj); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_PURCHASE_PLAN_D> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_PURCHASE_PLAN_D>(ServiceUri)) { return(smgr.Service.Load(id, out type_id, out currency_id, out unit_id, out base_id)); } } }
public EntityObject_MCE_B_ASSETS_PURCHASE Load(IDbTransaction transaction, string id, out EntityObject_MCE_D_MCE_TYPE type_id, out EntityObject_COM_USER apply_user_id, out EntityObject_COM_DEPART apply_dept_id, out EntityObject_COM_TYPE purchase_type_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_PURCHASE obj = new EntityObject_MCE_B_ASSETS_PURCHASE(); //平台自动生成代码 type_id = new EntityObject_MCE_D_MCE_TYPE(); apply_user_id = new EntityObject_COM_USER(); apply_dept_id = new EntityObject_COM_DEPART(); purchase_type_id = new EntityObject_COM_TYPE(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_PURCHASE.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.TYPE_ID)) { type_id.ID = obj.TYPE_ID; type_id = HelperObject_MCE_D_MCE_TYPE.Get(type_id, transaction); } if (!string.IsNullOrEmpty(obj.APPLY_USER_ID)) { apply_user_id.ID = obj.APPLY_USER_ID; apply_user_id = HelperObject_COM_USER.Get(apply_user_id, transaction); } if (!string.IsNullOrEmpty(obj.APPLY_DEPT_ID)) { apply_dept_id.ID = obj.APPLY_DEPT_ID; apply_dept_id = HelperObject_COM_DEPART.Get(apply_dept_id, transaction); } if (!string.IsNullOrEmpty(obj.PURCHASE_TYPE_ID)) { purchase_type_id.ID = obj.PURCHASE_TYPE_ID; purchase_type_id = HelperObject_COM_TYPE.Get(purchase_type_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_B_ASSETS_PURCHASE Load(string id, out EntityObject_MCE_D_MCE_TYPE type_id, out EntityObject_COM_USER apply_user_id, out EntityObject_COM_DEPART apply_dept_id, out EntityObject_COM_TYPE purchase_type_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_PURCHASE obj = new EntityObject_MCE_B_ASSETS_PURCHASE(); //平台自动生成代码 type_id = new EntityObject_MCE_D_MCE_TYPE(); apply_user_id = new EntityObject_COM_USER(); apply_dept_id = new EntityObject_COM_DEPART(); purchase_type_id = new EntityObject_COM_TYPE(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { obj = Load(transaction, id, out type_id, out apply_user_id, out apply_dept_id, out purchase_type_id); transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(obj); } else { using (ServiceManager <ServiceContract_MCE_B_ASSETS_PURCHASE> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_PURCHASE>(ServiceUri)) { return(smgr.Service.Load(id, out type_id, out apply_user_id, out apply_dept_id, out purchase_type_id)); } } }
public EntityObject_MCE_B_SALES_RETURN_D Load(IDbTransaction transaction, string id, out EntityObject_MDM_D_DEPT prd_id, out EntityObject_COM_TYPE unit_id, out EntityObject_MCE_D_MCE_TYPE asset_type_id, out EntityObject_MCE_B_SALES_RETURN base_id) { if (LocalMode) { EntityObject_MCE_B_SALES_RETURN_D obj = new EntityObject_MCE_B_SALES_RETURN_D(); //平台自动生成代码 prd_id = new EntityObject_MDM_D_DEPT(); unit_id = new EntityObject_COM_TYPE(); asset_type_id = new EntityObject_MCE_D_MCE_TYPE(); base_id = new EntityObject_MCE_B_SALES_RETURN(); obj.ID = id; obj = HelperObject_MCE_B_SALES_RETURN_D.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.PRD_ID)) { prd_id.ID = obj.PRD_ID; prd_id = HelperObject_MDM_D_DEPT.Get(prd_id, transaction); } if (!string.IsNullOrEmpty(obj.UNIT_ID)) { unit_id.ID = obj.UNIT_ID; unit_id = HelperObject_COM_TYPE.Get(unit_id, transaction); } if (!string.IsNullOrEmpty(obj.ASSET_TYPE_ID)) { asset_type_id.ID = obj.ASSET_TYPE_ID; asset_type_id = HelperObject_MCE_D_MCE_TYPE.Get(asset_type_id, transaction); } if (!string.IsNullOrEmpty(obj.BASE_ID)) { base_id.ID = obj.BASE_ID; base_id = HelperObject_MCE_B_SALES_RETURN.Get(base_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_D_TYPE_DEPT Load(string id, out EntityObject_COM_DEPART dept_id, out EntityObject_MCE_D_MCE_TYPE mce_type_id) { if (LocalMode) { EntityObject_MCE_D_TYPE_DEPT obj = new EntityObject_MCE_D_TYPE_DEPT(); //平台自动生成代码 dept_id = new EntityObject_COM_DEPART(); mce_type_id = new EntityObject_MCE_D_MCE_TYPE(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { obj = Load(transaction, id, out dept_id, out mce_type_id); transaction.Commit(); } catch (Exception expt) { transaction.Rollback(); Error(expt); } finally { IDALProvider.IDAL.PushConnection(connection); } } } return(obj); } else { using (ServiceManager <ServiceContract_MCE_D_TYPE_DEPT> smgr = new ServiceManager <ServiceContract_MCE_D_TYPE_DEPT>(ServiceUri)) { return(smgr.Service.Load(id, out dept_id, out mce_type_id)); } } }
public EntityObject_MCE_B_ASSETS_CHECK_TYPE Load(IDbTransaction transaction, string id, out EntityObject_MCE_D_MCE_TYPE type_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_CHECK_TYPE obj = new EntityObject_MCE_B_ASSETS_CHECK_TYPE(); //平台自动生成代码 type_id = new EntityObject_MCE_D_MCE_TYPE(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_CHECK_TYPE.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.TYPE_ID)) { type_id.ID = obj.TYPE_ID; type_id = HelperObject_MCE_D_MCE_TYPE.Get(type_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public BizLogicMsg Save_Ext(JsonMceType jsonMceType) { if (LocalMode) { BizLogicMsg msg = new BizLogicMsg(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { EntityObject_MCE_D_MCE_TYPE obj = new EntityObject_MCE_D_MCE_TYPE(); obj.CODE = jsonMceType.code; obj.NAME = jsonMceType.name; obj.PARENT_ID = jsonMceType.parent_id; obj.STATE = jsonMceType.state; if (string.IsNullOrEmpty(jsonMceType.id)) { obj.CREATE_TIME = DateTime.Now; obj.CREATE_USER_ID = Ipedf.Web.BizLogic.SystemLogic.Proxy.CurrentUser.ID; int amount = HelperObject_MCE_D_MCE_TYPE.Save(obj, transaction); } else { obj.ID = jsonMceType.id; int amount = HelperObject_MCE_D_MCE_TYPE.Update(obj, transaction); /* * CauseObject_MCE_D_TYPE_DEPT cause = new CauseObject_MCE_D_TYPE_DEPT(); * cause.MCE_TYPE_ID = jsonMceType.id; * int amount1 = HelperObject_MCE_D_TYPE_DEPT.Delete(cause, transaction); */ } /* * if (jsonMceType.listDeptID != null && jsonMceType.listDeptID.Count>0) * { * foreach (string strDeptID in jsonMceType.listDeptID) * { * EntityObject_MCE_D_TYPE_DEPT item = new EntityObject_MCE_D_TYPE_DEPT(); * item.MCE_TYPE_ID = obj.ID; * item.DEPT_ID = strDeptID; * HelperObject_MCE_D_TYPE_DEPT.Save(item, 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_D_MCE_TYPE> smgr = new ServiceManager <ServiceContract_MCE_D_MCE_TYPE>(ServiceUri)) { return(smgr.Service.Save_Ext(jsonMceType)); } } }
public BizLogicMsg Delete_Ext(List <string> listID) { if (LocalMode) { BizLogicMsg msg = new BizLogicMsg(); using (IDbConnection connection = IDALProvider.IDAL.PopConnection()) { using (IDbTransaction transaction = connection.BeginTransaction()) { try { if (listID != null && listID.Count > 0) { foreach (string strID in listID) { CauseObject_MCE_D_MCE_TYPE p_Type = new CauseObject_MCE_D_MCE_TYPE(); p_Type.PARENT_ID = strID; DisplayObject_MCE_D_MCE_TYPE[] listMCE_D_MCE_TYPE = BizLogicObject_MCE_D_MCE_TYPE.Proxy.Query(p_Type); if (listMCE_D_MCE_TYPE != null && listMCE_D_MCE_TYPE.Length > 0) { throw new Exception("该资产分类下存在子分类,不能删除."); } CauseObject_MCE_B_ASSETS p = new CauseObject_MCE_B_ASSETS(); p.MACHINE_TYPE_ID = strID; DisplayObject_MCE_B_ASSETS[] list = BizLogicObject_MCE_B_ASSETS.Proxy.Query(p); if (list != null && list.Length > 0) { throw new Exception("在资产卡片中已经使用的资产分类不能删除."); } EntityObject_MCE_D_MCE_TYPE obj = new EntityObject_MCE_D_MCE_TYPE(); obj.ID = strID; if (obj.STATE == 1) { throw new Exception("状态为[正常]的资产分类不能删除."); } obj = HelperObject_MCE_D_MCE_TYPE.Get(obj); if (obj != null) { HelperObject_MCE_D_MCE_TYPE.Delete(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_D_MCE_TYPE> smgr = new ServiceManager <ServiceContract_MCE_D_MCE_TYPE>(ServiceUri)) { return(smgr.Service.Delete_Ext(listID)); } } }
public EntityObject_MCE_B_ASSETS_MT_APPLY Load(IDbTransaction transaction, string id, out EntityObject_MDM_D_DEPT prd_id, out EntityObject_COM_USER apply_user_id, out EntityObject_COM_TYPE mtn_type_id, out EntityObject_COM_DEPART apply_dept_id, out EntityObject_COM_USER using_user_id, out EntityObject_COM_TYPE repair_result, out EntityObject_MCE_D_MCE_TYPE assets_type_id, out EntityObject_COM_TYPE emergency_degree, out EntityObject_COM_DEPART using_dept_id, out EntityObject_COM_TYPE fault_type, out EntityObject_MCE_B_ASSETS assets_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_MT_APPLY obj = new EntityObject_MCE_B_ASSETS_MT_APPLY(); //平台自动生成代码 prd_id = new EntityObject_MDM_D_DEPT(); apply_user_id = new EntityObject_COM_USER(); mtn_type_id = new EntityObject_COM_TYPE(); apply_dept_id = new EntityObject_COM_DEPART(); using_user_id = new EntityObject_COM_USER(); repair_result = new EntityObject_COM_TYPE(); assets_type_id = new EntityObject_MCE_D_MCE_TYPE(); emergency_degree = new EntityObject_COM_TYPE(); using_dept_id = new EntityObject_COM_DEPART(); fault_type = new EntityObject_COM_TYPE(); assets_id = new EntityObject_MCE_B_ASSETS(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_MT_APPLY.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.PRD_ID)) { prd_id.ID = obj.PRD_ID; prd_id = HelperObject_MDM_D_DEPT.Get(prd_id, transaction); } if (!string.IsNullOrEmpty(obj.APPLY_USER_ID)) { apply_user_id.ID = obj.APPLY_USER_ID; apply_user_id = HelperObject_COM_USER.Get(apply_user_id, transaction); } if (!string.IsNullOrEmpty(obj.MTN_TYPE_ID)) { mtn_type_id.ID = obj.MTN_TYPE_ID; mtn_type_id = HelperObject_COM_TYPE.Get(mtn_type_id, transaction); } if (!string.IsNullOrEmpty(obj.APPLY_DEPT_ID)) { apply_dept_id.ID = obj.APPLY_DEPT_ID; apply_dept_id = HelperObject_COM_DEPART.Get(apply_dept_id, transaction); } if (!string.IsNullOrEmpty(obj.USING_USER_ID)) { using_user_id.ID = obj.USING_USER_ID; using_user_id = HelperObject_COM_USER.Get(using_user_id, transaction); } if (!string.IsNullOrEmpty(obj.REPAIR_RESULT)) { repair_result.ID = obj.REPAIR_RESULT; repair_result = HelperObject_COM_TYPE.Get(repair_result, transaction); } if (!string.IsNullOrEmpty(obj.ASSETS_TYPE_ID)) { assets_type_id.ID = obj.ASSETS_TYPE_ID; assets_type_id = HelperObject_MCE_D_MCE_TYPE.Get(assets_type_id, transaction); } if (!string.IsNullOrEmpty(obj.EMERGENCY_DEGREE)) { emergency_degree.ID = obj.EMERGENCY_DEGREE; emergency_degree = HelperObject_COM_TYPE.Get(emergency_degree, transaction); } if (!string.IsNullOrEmpty(obj.USING_DEPT_ID)) { using_dept_id.ID = obj.USING_DEPT_ID; using_dept_id = HelperObject_COM_DEPART.Get(using_dept_id, transaction); } if (!string.IsNullOrEmpty(obj.FAULT_TYPE)) { fault_type.ID = obj.FAULT_TYPE; fault_type = HelperObject_COM_TYPE.Get(fault_type, transaction); } if (!string.IsNullOrEmpty(obj.ASSETS_ID)) { assets_id.ID = obj.ASSETS_ID; assets_id = HelperObject_MCE_B_ASSETS.Get(assets_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public EntityObject_MCE_B_ASSETS_INSTOCK_D Load(IDbTransaction transaction, string id, out EntityObject_COM_TYPE currency_id, out EntityObject_COM_TYPE country, out EntityObject_MDM_D_DEPT prd_id, out EntityObject_MCE_B_ASSETS_INSTOCK base_id, out EntityObject_MCE_D_MCE_TYPE asset_type_id, out EntityObject_MCE_D_DEPR_TYPE depr_type_id, out EntityObject_COM_TYPE unit_id, out EntityObject_COM_DEPART using_dept_id) { if (LocalMode) { EntityObject_MCE_B_ASSETS_INSTOCK_D obj = new EntityObject_MCE_B_ASSETS_INSTOCK_D(); //平台自动生成代码 currency_id = new EntityObject_COM_TYPE(); country = new EntityObject_COM_TYPE(); prd_id = new EntityObject_MDM_D_DEPT(); base_id = new EntityObject_MCE_B_ASSETS_INSTOCK(); asset_type_id = new EntityObject_MCE_D_MCE_TYPE(); depr_type_id = new EntityObject_MCE_D_DEPR_TYPE(); unit_id = new EntityObject_COM_TYPE(); using_dept_id = new EntityObject_COM_DEPART(); obj.ID = id; obj = HelperObject_MCE_B_ASSETS_INSTOCK_D.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.CURRENCY_ID)) { currency_id.ID = obj.CURRENCY_ID; currency_id = HelperObject_COM_TYPE.Get(currency_id, transaction); } if (!string.IsNullOrEmpty(obj.COUNTRY)) { country.ID = obj.COUNTRY; country = HelperObject_COM_TYPE.Get(country, transaction); } if (!string.IsNullOrEmpty(obj.PRD_ID)) { prd_id.ID = obj.PRD_ID; prd_id = HelperObject_MDM_D_DEPT.Get(prd_id, transaction); } if (!string.IsNullOrEmpty(obj.BASE_ID)) { base_id.ID = obj.BASE_ID; base_id = HelperObject_MCE_B_ASSETS_INSTOCK.Get(base_id, transaction); } if (!string.IsNullOrEmpty(obj.ASSET_TYPE_ID)) { asset_type_id.ID = obj.ASSET_TYPE_ID; asset_type_id = HelperObject_MCE_D_MCE_TYPE.Get(asset_type_id, transaction); } if (!string.IsNullOrEmpty(obj.DEPR_TYPE_ID)) { depr_type_id.ID = obj.DEPR_TYPE_ID; depr_type_id = HelperObject_MCE_D_DEPR_TYPE.Get(depr_type_id, transaction); } if (!string.IsNullOrEmpty(obj.UNIT_ID)) { unit_id.ID = obj.UNIT_ID; unit_id = HelperObject_COM_TYPE.Get(unit_id, transaction); } if (!string.IsNullOrEmpty(obj.USING_DEPT_ID)) { using_dept_id.ID = obj.USING_DEPT_ID; using_dept_id = HelperObject_COM_DEPART.Get(using_dept_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }