/// <summary>
        /// 从IIS缓存中获取指定Id记录
        /// </summary>
        /// <param name="id">主键Id</param>
		/// <returns>DataAccess.Model.V_TAKEIN11_PRODUCT00</returns>
        public DataAccess.Model.V_TAKEIN11_PRODUCT00 GetModelForCache(long id)
        {
			try
			{
				//从缓存中读取指定Id记录
                var model = GetModelForCache(x => x.Id == id);

				if (model == null){
					//从数据库中读取
					var tem = V_TAKEIN11_PRODUCT00.SingleOrDefault(x => x.Id == id);
					if (tem == null)
					{
						return null;
					}
					else
					{
						//对查询出来的实体进行转换
						model = Transform(tem);
						return model;
					}
				}
				else
				{
					return model;
				}
			}
            catch (Exception e)
            {
                //记录日志
                CommonBll.WriteLog("从IIS缓存中获取V_TAKEIN11_PRODUCT00表记录时出现异常", e);

                return null;
            }
        }
		/// <summary>
        /// 获取指定Id记录
        /// </summary>
        /// <param name="id">主键Id</param>
        /// <param name="isCache">是否从缓存中读取</param>
		/// <returns>DataAccess.Model.V_TAKEIN11_PRODUCT00</returns>
        public DataAccess.Model.V_TAKEIN11_PRODUCT00 GetModel(long id, bool isCache = true)
        {
            //判断是否使用缓存
		    if (CommonBll.IsUseCache() && isCache)
		    {
                //从缓存中获取List
		        var list = GetList();
		        if (list == null)
		        {
		            return null;
		        }
		        else
		        {
                    //在List查询指定主键Id的记录
		            return list.SingleOrDefault(x => x.Id == id);
		        }
		    }
		    else
		    {
                //从数据库中直接读取
                var model = V_TAKEIN11_PRODUCT00.SingleOrDefault(x => x.Id == id);
                if (model == null)
                {
                    return null;
                }
                else
                {
                    //对查询出来的实体进行转换
                    return Transform(model);
                }
		    }
        }
        /// <summary>
        /// 从IIS缓存中获取指定Id记录
        /// </summary>
        /// <param name="conditionColName">条件列名</param>
        /// <param name="value">条件值</param>
        /// <returns>DataAccess.Model.V_TAKEIN11_PRODUCT00</returns>
        public DataAccess.Model.V_TAKEIN11_PRODUCT00 GetModelForCache(string conditionColName, object value)
        {
		try
            {
                //从缓存中获取List
                var list = GetList();
                DataAccess.Model.V_TAKEIN11_PRODUCT00 model = null;
                Expression<Func<V_TAKEIN11_PRODUCT00, bool>> expression = null;

                //返回指定条件的实体
                switch (conditionColName)
                {
					case "Id" :
						model = list.SingleOrDefault(x => x.Id == (int)value);
                        expression = x => x.Id == (int)value;
                        break;
					case "SHOP_ID" :
						model = list.SingleOrDefault(x => x.SHOP_ID == (string)value);
                        expression = x => x.SHOP_ID == (string)value;
                        break;
					case "TAKEIN_ID" :
						model = list.SingleOrDefault(x => x.TAKEIN_ID == (string)value);
                        expression = x => x.TAKEIN_ID == (string)value;
                        break;
					case "SNo" :
						model = list.SingleOrDefault(x => x.SNo == (int)value);
                        expression = x => x.SNo == (int)value;
                        break;
					case "PROD_ID" :
						model = list.SingleOrDefault(x => x.PROD_ID == (string)value);
                        expression = x => x.PROD_ID == (string)value;
                        break;
					case "QUANTITY" :
						model = list.SingleOrDefault(x => x.QUANTITY == (decimal)value);
                        expression = x => x.QUANTITY == (decimal)value;
                        break;
					case "STD_UNIT" :
						model = list.SingleOrDefault(x => x.STD_UNIT == (string)value);
                        expression = x => x.STD_UNIT == (string)value;
                        break;
					case "STD_CONVERT" :
						model = list.SingleOrDefault(x => x.STD_CONVERT == (int)value);
                        expression = x => x.STD_CONVERT == (int)value;
                        break;
					case "STD_QUAN" :
						model = list.SingleOrDefault(x => x.STD_QUAN == (decimal)value);
                        expression = x => x.STD_QUAN == (decimal)value;
                        break;
					case "STD_PRICE" :
						model = list.SingleOrDefault(x => x.STD_PRICE == (decimal)value);
                        expression = x => x.STD_PRICE == (decimal)value;
                        break;
					case "Tax" :
						model = list.SingleOrDefault(x => x.Tax == (decimal)value);
                        expression = x => x.Tax == (decimal)value;
                        break;
					case "QUAN1" :
						model = list.SingleOrDefault(x => x.QUAN1 == (decimal)value);
                        expression = x => x.QUAN1 == (decimal)value;
                        break;
					case "QUAN2" :
						model = list.SingleOrDefault(x => x.QUAN2 == (decimal)value);
                        expression = x => x.QUAN2 == (decimal)value;
                        break;
					case "Item_DISC_Amt" :
						model = list.SingleOrDefault(x => x.Item_DISC_Amt == (decimal)value);
                        expression = x => x.Item_DISC_Amt == (decimal)value;
                        break;
					case "MEMO" :
						model = list.SingleOrDefault(x => x.MEMO == (string)value);
                        expression = x => x.MEMO == (string)value;
                        break;
					case "BAT_NO" :
						model = list.SingleOrDefault(x => x.BAT_NO == (string)value);
                        expression = x => x.BAT_NO == (string)value;
                        break;
					case "Exp_DateTime" :
						model = list.SingleOrDefault(x => x.Exp_DateTime == (DateTime)value);
                        expression = x => x.Exp_DateTime == (DateTime)value;
                        break;
					case "PROD_NAME1" :
						model = list.SingleOrDefault(x => x.PROD_NAME1 == (string)value);
                        expression = x => x.PROD_NAME1 == (string)value;
                        break;
					case "STD_UNIT_NAME" :
						model = list.SingleOrDefault(x => x.STD_UNIT_NAME == (string)value);
                        expression = x => x.STD_UNIT_NAME == (string)value;
                        break;
					case "SUP_COST" :
						model = list.SingleOrDefault(x => x.SUP_COST == (decimal)value);
                        expression = x => x.SUP_COST == (decimal)value;
                        break;
					case "SUP_COST1" :
						model = list.SingleOrDefault(x => x.SUP_COST1 == (decimal)value);
                        expression = x => x.SUP_COST1 == (decimal)value;
                        break;
					case "SUP_COST2" :
						model = list.SingleOrDefault(x => x.SUP_COST2 == (decimal)value);
                        expression = x => x.SUP_COST2 == (decimal)value;
                        break;
					case "UNIT_NAME" :
						model = list.SingleOrDefault(x => x.UNIT_NAME == (string)value);
                        expression = x => x.UNIT_NAME == (string)value;
                        break;
					case "UNIT_NAME1" :
						model = list.SingleOrDefault(x => x.UNIT_NAME1 == (string)value);
                        expression = x => x.UNIT_NAME1 == (string)value;
                        break;
					case "UNIT_NAME2" :
						model = list.SingleOrDefault(x => x.UNIT_NAME2 == (string)value);
                        expression = x => x.UNIT_NAME2 == (string)value;
                        break;
					case "PROD_CONVERT1" :
						model = list.SingleOrDefault(x => x.PROD_CONVERT1 == (int)value);
                        expression = x => x.PROD_CONVERT1 == (int)value;
                        break;
					case "PROD_CONVERT2" :
						model = list.SingleOrDefault(x => x.PROD_CONVERT2 == (int)value);
                        expression = x => x.PROD_CONVERT2 == (int)value;
                        break;
					case "PRCAREA_ID" :
						model = list.SingleOrDefault(x => x.PRCAREA_ID == (string)value);
                        expression = x => x.PRCAREA_ID == (string)value;
                        break;
					case "TAX_TYPE" :
						model = list.SingleOrDefault(x => x.TAX_TYPE == (byte)value);
                        expression = x => x.TAX_TYPE == (byte)value;
                        break;
					case "Tax_Num" :
						model = list.SingleOrDefault(x => x.Tax_Num == (int)value);
                        expression = x => x.Tax_Num == (int)value;
                        break;
					case "SHOP_NAME1" :
						model = list.SingleOrDefault(x => x.SHOP_NAME1 == (string)value);
                        expression = x => x.SHOP_NAME1 == (string)value;
                        break;

                    default :
                        return null;
                }

                if (model == null)
                {
                    //从数据库中读取
                    var tem = V_TAKEIN11_PRODUCT00.SingleOrDefault(expression);
                    if (tem == null)
                    {
                        return null;
                    }
                    else
                    {
                        //对查询出来的实体进行转换
                        model = Transform(tem);

                        return model;
                    }
                }
                else
                {
                    return model;
                }
            }
            catch (Exception e)
            {
                //记录日志
                CommonBll.WriteLog("从IIS缓存中获取V_TAKEIN11_PRODUCT00表记录时出现异常", e);

                return null;
            }
        }