コード例 #1
0
 /// <summary>
 /// 缓存单据步骤
 /// </summary>
 /// <returns></returns>
 public static Orders.OrderSteps GetOrderSteps()
 {
     Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
     Orders.OrderSteps        x     = cache.RetrieveObject("/Sys/OrderSteps") as Orders.OrderSteps;
     if (x == null)
     {
         x = Orders.OrderSteps.GetOrderSteps();
         cache.AddObject("/Sys/OrderSteps", x);
     }
     return(x);
 }
コード例 #2
0
        /// <summary>
        /// 科目
        /// </summary>
        /// <param name="pid"></param>
        /// <param name="getdata"></param>
        /// <param name="isAll"></param>
        /// <returns></returns>
        public static string GetFeesSubjectClassInfoToJson(int pid, bool getdata, bool isAll)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetFeesSubjectClassInfoToJson_" + Utils.MD5(pid.ToString() + getdata.ToString() + isAll.ToString())) as string;

            if (x == null)
            {
                x = DataClass.GetFeesSubjectClassInfoToJson(pid, getdata, isAll);
                cache.AddObject("/Sys/GetFeesSubjectClassInfoToJson_" + Utils.MD5(pid.ToString() + getdata.ToString() + isAll.ToString()), x);
            }
            return(x);
        }
コード例 #3
0
        /// <summary>
        /// 缓存权限列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetUserPopedom()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/UserPopedom") as DataTable;

            if (x == null)
            {
                x = UsersUtils.GetUserPopedom();
                cache.AddObject("/Sys/UserPopedom", x);
            }
            return(x);
        }
コード例 #4
0
        public static string GetProductClassInfoToJson(int t, bool p, int orderType = 0)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetProductClassInfoToJson_" + Utils.MD5(t.ToString() + p.ToString() + orderType.ToString())) as string;

            if (x == null)
            {
                x = DataClass.GetProductClassInfoToJson(t, p, orderType);
                cache.AddObject("/Sys/GetProductClassInfoToJson_" + Utils.MD5(t.ToString() + p.ToString() + orderType.ToString()), x);
            }
            return(x);
        }
コード例 #5
0
        /// <summary>
        /// 获得地区列表XML
        /// </summary>
        public static string GetRegionListToXML(int PRegionID)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/RegionList_" + PRegionID.ToString()) as string;

            if (x == null)
            {
                x = tbRegionInfo.GetRegionListToXML(PRegionID);
                cache.AddObject("/Sys/RegionList_" + PRegionID.ToString(), x);
            }
            return(x);
        }
コード例 #6
0
        public static string GetRegionInfoToJson()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetRegionInfoToJson") as string;

            if (x == null)
            {
                x = DataClass.GetRegionInfoToJson();
                cache.AddObject("/Sys/GetRegionInfoToJson", x);
            }
            return(x);
        }
コード例 #7
0
        public static string GetRegionInfoToHTML(int t)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetRegionInfoToHTML_" + Utils.MD5(t.ToString())) as string;

            if (x == null)
            {
                x = DataClass.GetRegionInfoToHTML(t);
                cache.AddObject("/Sys/GetRegionInfoToHTML_" + Utils.MD5(t.ToString()), x);
            }
            return(x);
        }
コード例 #8
0
        /// <summary>
        /// 供应商分类,供应商列表,树
        /// </summary>
        /// <returns></returns>
        public static string GetSupplierClassInfoAndDataToHTML()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetSupplierClassInfoAndDataToHTML") as string;

            if (x == null)
            {
                x = DataClass.GetSupplierClassInfoAndDataToHTML();
                cache.AddObject("/Sys/GetSupplierClassInfoAndDataToHTML", x);
            }
            return(x);
        }
コード例 #9
0
        /// <summary>
        /// 部门,人员,树形
        /// </summary>
        /// <returns></returns>
        public static string GetDepartmentsClassInfoAndStaffListToHTML()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetDepartmentsClassInfoAndStaffListToHTML") as string;

            if (x == null)
            {
                x = DataClass.GetDepartmentsClassInfoAndStaffListToHTML();
                cache.AddObject("/Sys/GetDepartmentsClassInfoAndStaffListToHTML", x);
            }
            return(x);
        }
コード例 #10
0
        /// <summary>
        /// 缓存仓库列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetStorageInfoList(string tSQL)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/GetStorageInfoList_" + Utils.MD5(tSQL)) as DataTable;

            if (x == null)
            {
                x = tbStorageInfo.GetStorageInfoList(tSQL).Tables[0];
                cache.AddObject("/Sys/GetStorageInfoList_" + Utils.MD5(tSQL), x);
            }
            return(x);
        }
コード例 #11
0
        /// <summary>
        /// 结算系统列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetPaymentSystemData()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/GetPaymentSystemData") as DataTable;

            if (x == null)
            {
                x = tbPaymentSystemInfo.GetPaymentSystemList("").Tables[0];
                cache.AddObject("/Sys/GetPaymentSystemData", x);
            }
            return(x);
        }
コード例 #12
0
        /// <summary>
        /// 仓库信息分类
        /// </summary>
        /// <param name="t"></param>
        /// <param name="p"></param>
        /// <returns></returns>
        public static string GetStorageClassInfoToJson(int t, bool p)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetStorageClassInfoToJson_" + Utils.MD5(t.ToString() + p.ToString())) as string;

            if (x == null)
            {
                x = DataClass.GetStoragesClassInfoToJson(t, p);
                cache.AddObject("/Sys/GetStorageClassInfoToJson_" + Utils.MD5(t.ToString() + p.ToString()), x);
            }
            return(x);
        }
コード例 #13
0
        public static DataSet GetProductLogDetails(DateTime bDate, DateTime eDate, int ProductsID, int CostPrice, int StorageID)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataSet x = cache.RetrieveObject("/Sys/GetProductLogDetails_" + Utils.MD5(ProductsID.ToString() + bDate.ToString() + eDate.ToString() + CostPrice.ToString() + StorageID.ToString())) as DataSet;

            if (x == null)
            {
                x = DataUtils.GetProductLogDetails(bDate, eDate, ProductsID, CostPrice, StorageID);
                cache.AddObject("/Sys/GetProductLogDetails_" + Utils.MD5(ProductsID.ToString() + bDate.ToString() + eDate.ToString() + CostPrice.ToString() + StorageID.ToString()), x);
            }
            return(x);
        }
コード例 #14
0
        public static DataTable GetSalesReport(int ReDateType, int ReType, DateTime bDate, DateTime eDate, int NOJoinSales, int StoresID, int PaymentSystemID, int oSteps, int dType, int CostPrice, int SingleMemberID, string OrderNumber)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/GetSalesReport_" + Utils.MD5(ReDateType.ToString() + ReType.ToString() + bDate.ToString() + eDate.ToString() + NOJoinSales.ToString() + StoresID.ToString() + PaymentSystemID.ToString() + oSteps.ToString() + dType.ToString() + CostPrice.ToString() + SingleMemberID.ToString() + OrderNumber)) as DataTable;

            if (x == null)
            {
                x = DataUtils.GetSalesReport(ReDateType, ReType, bDate, eDate, NOJoinSales, StoresID, PaymentSystemID, oSteps, dType, CostPrice, SingleMemberID, OrderNumber);
                cache.AddObject("/Sys/GetSalesReport_" + Utils.MD5(ReDateType.ToString() + ReType.ToString() + bDate.ToString() + eDate.ToString() + NOJoinSales.ToString() + StoresID.ToString() + PaymentSystemID.ToString() + oSteps.ToString() + dType.ToString() + CostPrice.ToString() + SingleMemberID.ToString() + OrderNumber), x);
            }
            return(x);
        }
コード例 #15
0
        /// <summary>
        /// 超市系统列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetYHsysInfoList()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/GetYHsysInfoList") as DataTable;

            if (x == null)
            {
                x = tbYHsysInfo.GetYHsysInfoList("").Tables[0];
                cache.AddObject("/Sys/GetYHsysInfoList", x);
            }
            return(x);
        }
コード例 #16
0
        /// <summary>
        /// 获取商品类目列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetGoodsCatList(int mconfigid)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/GetGoodsCatList_" + mconfigid) as DataTable;

            if (x == null)
            {
                x = M_Utils.GetM_GoodsCatInfoList(" m_ConfigInfoID=" + mconfigid).Tables[0];
                cache.AddObject("/Sys/GetGoodsCatList_" + mconfigid, x);
            }
            return(x);
        }
コード例 #17
0
        /// <summary>
        /// 网店列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetMConfigList()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            DataTable x = cache.RetrieveObject("/Sys/GetMConfigList") as DataTable;

            if (x == null)
            {
                x = M_Utils.GetM_ConfigInfoList(" m_State=0 order by m_ConfigInfoID desc").Tables[0];
                cache.AddObject("/Sys/GetMConfigList", x);
            }
            return(x);
        }
コード例 #18
0
        /// <summary>
        /// 获得天气预报
        /// </summary>
        public static Weather GetWeather(string CityName)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            Weather w = cache.RetrieveObject("/Sys/Weather" + Utils.MD5(CityName)) as Weather;

            if (w == null)
            {
                w = WeatherWebService.getWeatherbyCityName(CityName);//接口获取天气数据
                cache.AddObject("/Sys/Weather" + Utils.MD5(CityName), w);
            }

            return(w);
        }
コード例 #19
0
        /// <summary>
        /// 取网店配置信息
        /// </summary>
        /// <param name="mconfigid"></param>
        /// <returns></returns>
        public static M_ConfigInfo GetMConfig(int mconfigid)
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            M_ConfigInfo             x     = cache.RetrieveObject("/Sys/GetMConfigList_" + mconfigid) as M_ConfigInfo;

            if (x == null)
            {
                x          = M_Utils.GetM_ConfigInfoModel(mconfigid);
                x.m_APIURL = GeneralConfigs.GetConfig().Taobao_Api.Trim();
                cache.AddObject("/Sys/GetMConfigList_" + mconfigid, x);
            }
            return(x);
        }
コード例 #20
0
        /// <summary>
        /// 结算系统Json
        /// </summary>
        /// <returns></returns>
        public static string GetPaymentSystemJson()
        {
            Yannyo.Cache.YannyoCache cache = Yannyo.Cache.YannyoCache.GetCacheService();
            string x = cache.RetrieveObject("/Sys/GetPaymentSystemDataJson") as string;

            if (x == null)
            {
                string    _x  = "";
                DataTable _ps = new DataTable();
                _ps = Caches.GetPaymentSystemData();
                if (_ps != null)
                {
                    foreach (DataRow _dr in _ps.Rows)
                    {
                        _x += "{\"data\":\"" + _dr["pName"] + "\",\"state\":\"closed\",\"attr\":{\"id\":\"d_" + _dr["PaymentSystemID"] + "\",\"rel\":\"dt\",\"pid\":\"0\",\"cDirection\":\"\",\"cCode\":\"\",\"otype\":\"3\",\"children\":[]}},";
                    }
                    x = Utils.ReSQLSetTxt(_x);
                }

                cache.AddObject("/Sys/GetPaymentSystemDataJson", x);
            }
            return(x);
        }