1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using JLHHJSvr.BLL;
- using JLHHJSvr.Com.Model;
- using LJLib.DAL.SQL;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace JLHHJSvr.Helper
- {
- internal sealed class CacheHelper : HelperBase
- {
- /// <summary>
- /// 部件选配项
- /// </summary>
- /// <param name="typeid"></param>
- /// <param name="name"></param>
- /// <returns></returns>
- public erp_configure_code u_configure_code(int typeid, string name)
- {
- string key = string.Format("typeid:{0},name:{1}", typeid, name);
- if (_u_configure_code != null)
- {
- if (_u_configure_code.ContainsKey(key))
- {
- return _u_configure_code[key];
- }
- }
- else
- {
- _u_configure_code = new Dictionary<string, erp_configure_code>();
- }
- var rslt = new erp_configure_code
- {
- typeid = typeid,
- name = name,
- };
- DbSqlHelper.SelectOne(cmd, rslt,
- "typeid,pzid,pzcode,name,inputtype,configtype,ifcross,ifcheck,ifuse,rulestr,ifnum,decnum,maxnum,minnum");
- _u_configure_code[key] = rslt;
- return rslt;
- }
- private Dictionary<string, erp_configure_code> _u_configure_code = null;
- }
- }
|