//=========================================================================
        //  FunctionName : Query
        /// <summary>
        /// 检索方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_BM_GZXXApplicationData Query(T_BM_GZXXApplicationData appData)
        {
            T_BM_GZXXBusinessEntity instanceT_BM_GZXXBusinessEntity = (T_BM_GZXXBusinessEntity)CreateBusinessEntityInstance(typeof(T_BM_GZXXBusinessEntity));

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

            instanceT_BM_GZXXBusinessEntity.AppData = appData;
            instanceT_BM_GZXXBusinessEntity.CountByAnyCondition();
            instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            return(instanceT_BM_GZXXBusinessEntity.AppData);
        }
        //=========================================================================
        //  FunctionName : Modify
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_BM_GZXXApplicationData Modify(T_BM_GZXXApplicationData appData)
        {
            T_BM_GZXXBusinessEntity instanceT_BM_GZXXBusinessEntity = (T_BM_GZXXBusinessEntity)CreateBusinessEntityInstance(typeof(T_BM_GZXXBusinessEntity));

            instanceT_BM_GZXXBusinessEntity.AppData = appData;
            if (instanceT_BM_GZXXBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.PK)
            {
                if (instanceT_BM_GZXXBusinessEntity.IsExistByKey() == true)
                {
                    instanceT_BM_GZXXBusinessEntity.UpdateByKey();
                    instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            else if (instanceT_BM_GZXXBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ID)
            {
                if (instanceT_BM_GZXXBusinessEntity.IsExistByObjectID() == true)
                {
                    instanceT_BM_GZXXBusinessEntity.UpdateByObjectID();
                    instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            else if (instanceT_BM_GZXXBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.BATCH)
            {
                instanceT_BM_GZXXBusinessEntity.UpdateByObjectIDBatch();
                instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_BM_GZXXBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ALL)
            {
                instanceT_BM_GZXXBusinessEntity.UpdateByAnyCondition();
                instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                if (instanceT_BM_GZXXBusinessEntity.IsExistByObjectID() == true)
                {
                    instanceT_BM_GZXXBusinessEntity.UpdateByObjectID();
                    instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            return(instanceT_BM_GZXXBusinessEntity.AppData);
        }
        public static IEnumerable <T_BM_GZXXApplicationData> GetCollectionFromImportDataTable(DataTable dt)
        {
            List <T_BM_GZXXApplicationData> collection = new List <T_BM_GZXXApplicationData>();

            foreach (DataRow dr in dt.Rows)
            {
                T_BM_GZXXApplicationData applicationData = new T_BM_GZXXApplicationData()
                {
                    ObjectID = (dr.ReadGuidNullable("ObjectID") == null ? null : dr.ReadGuidNullable("ObjectID").ToString()),
                    XM       = dr.ReadString("姓名"),
                    XB       = dr.ReadString("XB"),
                    SFZH     = dr.ReadString("身份证号码"),
                    FFGZNY   = dr.ReadString("FFGZNY"),
                    JCGZ     = dr.ReadDoubleNullable("JCGZ"),
                    JSDJGZ   = dr.ReadDoubleNullable("JSDJGZ"),
                    ZWGZ     = dr.ReadDoubleNullable("职务(岗位)工资"),
                    JBGZ     = dr.ReadDoubleNullable("级别(薪级、技术等级)工资"),
                    JKDQJT   = dr.ReadDoubleNullable("艰苦边远地区津贴"),
                    JKTSGWJT = dr.ReadDoubleNullable("JKTSGWJT"),
                    GLGZ     = dr.ReadDoubleNullable("GLGZ"),
                    XJGZ     = dr.ReadDoubleNullable("XJGZ"),
                    TGBF     = dr.ReadDoubleNullable("警衔工资(教师护士10%)"),
                    DHF      = dr.ReadDoubleNullable("公务移动通讯费"),
                    DSZNF    = dr.ReadDoubleNullable("独生子女费"),
                    FNWSHLF  = dr.ReadDoubleNullable("妇女卫生费"),
                    HLF      = dr.ReadDoubleNullable("HLF"),
                    JJ       = dr.ReadDoubleNullable("职工住宅取暖补贴"),
                    JTF      = dr.ReadDoubleNullable("上下班交通补助"),
                    JHLGZ    = dr.ReadDoubleNullable("特殊岗位津贴(教护龄工资)"),
                    JT       = dr.ReadDoubleNullable("JT"),
                    BF       = dr.ReadDoubleNullable("补发"),
                    QTBT     = dr.ReadDoubleNullable("QTBT"),
                    DFXJT    = dr.ReadDoubleNullable("地方津贴补贴(基础绩效工资)"),
                    YFX      = dr.ReadDoubleNullable("应发工资"),
                    QTKK     = dr.ReadDoubleNullable("QTKK"),
                    SYBX     = dr.ReadDoubleNullable("SYBX"),
                    SDNQF    = dr.ReadDoubleNullable("SDNQF"),
                    SDS      = dr.ReadDoubleNullable("SDS"),
                    YLBX     = dr.ReadDoubleNullable("YLBX"),
                    YLIBX    = dr.ReadDoubleNullable("YLIBX"),
                    YSSHF    = dr.ReadDoubleNullable("YSSHF"),
                    ZFGJJ    = dr.ReadDoubleNullable("ZFGJJ"),
                    KFX      = dr.ReadDoubleNullable("扣发部分"),
                    SFGZ     = dr.ReadDoubleNullable("实发工资"),
                    GZKKSM   = dr.ReadString("GZKKSM"),
                    TJSJ     = dr.ReadDateTimeNullable("TJSJ"),
                };
                collection.Add(applicationData);
            }
            return(collection);
        }
        //=========================================================================
        //  FunctionName : Add
        /// <summary>
        /// 添加方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_BM_GZXXApplicationData Add(T_BM_GZXXApplicationData appData)
        {
            T_BM_GZXXBusinessEntity instanceT_BM_GZXXBusinessEntity = (T_BM_GZXXBusinessEntity)CreateBusinessEntityInstance(typeof(T_BM_GZXXBusinessEntity));

            instanceT_BM_GZXXBusinessEntity.AppData = appData;
            if (instanceT_BM_GZXXBusinessEntity.IsExistByKey() == false)
            {
                instanceT_BM_GZXXBusinessEntity.Insert();
                instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                instanceT_BM_GZXXBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
            }
            return(instanceT_BM_GZXXBusinessEntity.AppData);
        }