Ejemplo n.º 1
0
        public EntityObject_MCE_B_ASSETS_OUTSTOCK Load(IDbTransaction transaction, string id, out EntityObject_COM_USER create_user_id, out EntityObject_COM_DEPART using_dept_id, out EntityObject_COM_USER user_id, out EntityObject_COM_USER using_user_id, out EntityObject_COM_DEPART dept_id, out EntityObject_MDM_D_STOCK stock_id)
        {
            if (LocalMode)
            {
                EntityObject_MCE_B_ASSETS_OUTSTOCK obj = new EntityObject_MCE_B_ASSETS_OUTSTOCK();

                //平台自动生成代码
                create_user_id = new EntityObject_COM_USER();
                using_dept_id  = new EntityObject_COM_DEPART();
                user_id        = new EntityObject_COM_USER();
                using_user_id  = new EntityObject_COM_USER();
                dept_id        = new EntityObject_COM_DEPART();
                stock_id       = new EntityObject_MDM_D_STOCK();


                obj.ID = id;
                obj    = HelperObject_MCE_B_ASSETS_OUTSTOCK.Get(obj, transaction);
                if (!string.IsNullOrEmpty(obj.CREATE_USER_ID))
                {
                    create_user_id.ID = obj.CREATE_USER_ID;
                    create_user_id    = HelperObject_COM_USER.Get(create_user_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);
                }
                if (!string.IsNullOrEmpty(obj.USER_ID))
                {
                    user_id.ID = obj.USER_ID;
                    user_id    = HelperObject_COM_USER.Get(user_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.DEPT_ID))
                {
                    dept_id.ID = obj.DEPT_ID;
                    dept_id    = HelperObject_COM_DEPART.Get(dept_id, transaction);
                }
                if (!string.IsNullOrEmpty(obj.STOCK_ID))
                {
                    stock_id.ID = obj.STOCK_ID;
                    stock_id    = HelperObject_MDM_D_STOCK.Get(stock_id, transaction);
                }
                return(obj);
            }
            else
            {
                throw new InvalidConstraintException();
            }
        }
Ejemplo n.º 2
0
        public EntityObject_MCE_B_ASSETS_OUTSTOCK Load(string id, out EntityObject_COM_USER create_user_id, out EntityObject_COM_DEPART using_dept_id, out EntityObject_COM_USER user_id, out EntityObject_COM_USER using_user_id, out EntityObject_COM_DEPART dept_id, out EntityObject_MDM_D_STOCK stock_id)
        {
            if (LocalMode)
            {
                EntityObject_MCE_B_ASSETS_OUTSTOCK obj = new EntityObject_MCE_B_ASSETS_OUTSTOCK();

                //平台自动生成代码
                create_user_id = new EntityObject_COM_USER();
                using_dept_id  = new EntityObject_COM_DEPART();
                user_id        = new EntityObject_COM_USER();
                using_user_id  = new EntityObject_COM_USER();
                dept_id        = new EntityObject_COM_DEPART();
                stock_id       = new EntityObject_MDM_D_STOCK();

                using (IDbConnection connection = IDALProvider.IDAL.PopConnection())
                {
                    using (IDbTransaction transaction = connection.BeginTransaction())
                    {
                        try
                        {
                            obj = Load(transaction, id, out create_user_id, out using_dept_id, out user_id, out using_user_id, out dept_id, out stock_id);
                            transaction.Commit();
                        }
                        catch (Exception expt)
                        {
                            transaction.Rollback();
                            Error(expt);
                        }
                        finally
                        {
                            IDALProvider.IDAL.PushConnection(connection);
                        }
                    }
                }
                return(obj);
            }
            else
            {
                using (ServiceManager <ServiceContract_MCE_B_ASSETS_OUTSTOCK> smgr = new ServiceManager <ServiceContract_MCE_B_ASSETS_OUTSTOCK>(ServiceUri))
                {
                    return(smgr.Service.Load(id, out create_user_id, out using_dept_id, out user_id, out using_user_id, out dept_id, out stock_id));
                }
            }
        }
        public EntityObject_MCE_B_ASSETS_INSTOCK Load(IDbTransaction transaction, string id, out EntityObject_COM_DEPART dept_id, out EntityObject_MDM_D_STOCK warehouse_id, out EntityObject_COM_USER user_id, out EntityObject_MDM_D_DEPT provider_id)
        {
            if (LocalMode)
            {
                EntityObject_MCE_B_ASSETS_INSTOCK obj = new EntityObject_MCE_B_ASSETS_INSTOCK();

                //平台自动生成代码
                dept_id      = new EntityObject_COM_DEPART();
                warehouse_id = new EntityObject_MDM_D_STOCK();
                user_id      = new EntityObject_COM_USER();
                provider_id  = new EntityObject_MDM_D_DEPT();


                obj.ID = id;
                obj    = HelperObject_MCE_B_ASSETS_INSTOCK.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.WAREHOUSE_ID))
                {
                    warehouse_id.ID = obj.WAREHOUSE_ID;
                    warehouse_id    = HelperObject_MDM_D_STOCK.Get(warehouse_id, transaction);
                }
                if (!string.IsNullOrEmpty(obj.USER_ID))
                {
                    user_id.ID = obj.USER_ID;
                    user_id    = HelperObject_COM_USER.Get(user_id, transaction);
                }
                if (!string.IsNullOrEmpty(obj.PROVIDER_ID))
                {
                    provider_id.ID = obj.PROVIDER_ID;
                    provider_id    = HelperObject_MDM_D_DEPT.Get(provider_id, transaction);
                }
                return(obj);
            }
            else
            {
                throw new InvalidConstraintException();
            }
        }
Ejemplo n.º 4
0
        public EntityObject_MCE_B_SALES_RETURN Load(IDbTransaction transaction, string id, out EntityObject_MDM_D_DEPT provider_id, out EntityObject_MDM_D_STOCK stock_id, out EntityObject_COM_USER user_id)
        {
            if (LocalMode)
            {
                EntityObject_MCE_B_SALES_RETURN obj = new EntityObject_MCE_B_SALES_RETURN();

                //平台自动生成代码
                provider_id = new EntityObject_MDM_D_DEPT();
                stock_id    = new EntityObject_MDM_D_STOCK();
                user_id     = new EntityObject_COM_USER();


                obj.ID = id;
                obj    = HelperObject_MCE_B_SALES_RETURN.Get(obj, transaction);
                if (!string.IsNullOrEmpty(obj.PROVIDER_ID))
                {
                    provider_id.ID = obj.PROVIDER_ID;
                    provider_id    = HelperObject_MDM_D_DEPT.Get(provider_id, transaction);
                }
                if (!string.IsNullOrEmpty(obj.STOCK_ID))
                {
                    stock_id.ID = obj.STOCK_ID;
                    stock_id    = HelperObject_MDM_D_STOCK.Get(stock_id, transaction);
                }
                if (!string.IsNullOrEmpty(obj.USER_ID))
                {
                    user_id.ID = obj.USER_ID;
                    user_id    = HelperObject_COM_USER.Get(user_id, transaction);
                }
                return(obj);
            }
            else
            {
                throw new InvalidConstraintException();
            }
        }