示例#1
0
        //=========================================================================
        //  FunctionName : Query
        /// <summary>
        /// 检索方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_PurviewInfoApplicationData Query(T_PM_PurviewInfoApplicationData appData)
        {
            T_PM_PurviewInfoBusinessEntity instanceT_PM_PurviewInfoBusinessEntity = (T_PM_PurviewInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_PurviewInfoBusinessEntity));

            instanceT_PM_PurviewInfoBusinessEntity.AppData = appData;
            if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.PK)
            {
                instanceT_PM_PurviewInfoBusinessEntity.SelectByKey();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ID)
            {
                instanceT_PM_PurviewInfoBusinessEntity.SelectByObjectID();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ALL)
            {
                instanceT_PM_PurviewInfoBusinessEntity.SelectByAnyCondition();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                instanceT_PM_PurviewInfoBusinessEntity.SelectByAnyCondition();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            return(instanceT_PM_PurviewInfoBusinessEntity.AppData);
        }
示例#2
0
        //=========================================================================
        //  FunctionName : Count
        /// <summary>
        /// 统计记录数方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_PurviewInfoApplicationData Count(T_PM_PurviewInfoApplicationData appData)
        {
            T_PM_PurviewInfoBusinessEntity instanceT_PM_PurviewInfoBusinessEntity = (T_PM_PurviewInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_PurviewInfoBusinessEntity));

            instanceT_PM_PurviewInfoBusinessEntity.AppData = appData;
            instanceT_PM_PurviewInfoBusinessEntity.CountByAnyCondition();
            instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            return(instanceT_PM_PurviewInfoBusinessEntity.AppData);
        }
示例#3
0
        //=========================================================================
        //  FunctionName : Modify
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_PurviewInfoApplicationData Modify(T_PM_PurviewInfoApplicationData appData)
        {
            T_PM_PurviewInfoBusinessEntity instanceT_PM_PurviewInfoBusinessEntity = (T_PM_PurviewInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_PurviewInfoBusinessEntity));

            instanceT_PM_PurviewInfoBusinessEntity.AppData = appData;
            if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.PK)
            {
                if (instanceT_PM_PurviewInfoBusinessEntity.IsExistByKey() == true)
                {
                    instanceT_PM_PurviewInfoBusinessEntity.UpdateByKey();
                    instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            else if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ID)
            {
                if (instanceT_PM_PurviewInfoBusinessEntity.IsExistByObjectID() == true)
                {
                    instanceT_PM_PurviewInfoBusinessEntity.UpdateByObjectID();
                    instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            else if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.BATCH)
            {
                instanceT_PM_PurviewInfoBusinessEntity.UpdateByObjectIDBatch();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_PM_PurviewInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ALL)
            {
                instanceT_PM_PurviewInfoBusinessEntity.UpdateByAnyCondition();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                if (instanceT_PM_PurviewInfoBusinessEntity.IsExistByObjectID() == true)
                {
                    instanceT_PM_PurviewInfoBusinessEntity.UpdateByObjectID();
                    instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            return(instanceT_PM_PurviewInfoBusinessEntity.AppData);
        }
示例#4
0
        //=========================================================================
        //  FunctionName : Add
        /// <summary>
        /// 添加方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_PurviewInfoApplicationData Add(T_PM_PurviewInfoApplicationData appData)
        {
            T_PM_PurviewInfoBusinessEntity instanceT_PM_PurviewInfoBusinessEntity = (T_PM_PurviewInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_PurviewInfoBusinessEntity));

            instanceT_PM_PurviewInfoBusinessEntity.AppData = appData;
            if (instanceT_PM_PurviewInfoBusinessEntity.IsExistByKey() == false)
            {
                instanceT_PM_PurviewInfoBusinessEntity.Insert();
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                instanceT_PM_PurviewInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
            }
            return(instanceT_PM_PurviewInfoBusinessEntity.AppData);
        }
示例#5
0
        //=========================================================================
        //  FunctionName : GetValueByFixCondition
        /// <summary>
        /// 取指定条件的指定值方法
        /// </summary>
        /// <returns>返回值</returns>
        //=========================================================================
        public object GetValueByFixCondition(string strConditionField, object strConditionValue, string strValueField)
        {
            T_PM_PurviewInfoBusinessEntity instanceT_PM_PurviewInfoBusinessEntity = (T_PM_PurviewInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_PurviewInfoBusinessEntity));

            return(instanceT_PM_PurviewInfoBusinessEntity.GetValueByFixCondition(strConditionField, strConditionValue, strValueField));
        }