예제 #1
0
        //返回退税手续费
        public static decimal Refund_Fee(string Refund_StepR, decimal Money_Refund_VAT, decimal Money_Product)
        {
            double Money_Refund_VAT_ = Convert.ToDouble(Money_Refund_VAT);

            try
            {
                if (Refund_StepR != null)
                {
                    List <BaseConfigStepR> stepRs = B_BaseConfig.StepR(Refund_StepR);
                    if (stepRs.Count > 0)
                    {
                        foreach (BaseConfigStepR stepR in stepRs)
                        {
                            if (Money_Product > stepR.S)
                            {
                                double R = Convert.ToDouble(stepR.R);
                                return(Convert.ToDecimal(Math.Pow(Money_Refund_VAT_, R)));
                            }
                        }
                    }
                }
            }
            catch
            {
                return(0);
            }
            return(0);
        }
예제 #2
0
        /// <summary>
        /// 基本设置信息
        /// </summary>
        /// <returns></returns>
        public static BaseConfig GetBaseConfig()
        {
            string     cacheKey = "BaseConfig";
            BaseConfig model    = CacheTool.Get(cacheKey) as BaseConfig;

            if (model == null)
            {
                B_BaseConfig bmodel = new B_BaseConfig();
                model            = bmodel.LoadConfig();
                model.IsMutiSite = false;
                SetBaseConfig(model);
            }
            return(model);
        }
예제 #3
0
 public static void SetBaseConfig(int Supplier_id = 0)
 {
     if (Supplier_id == 0)
     {
         B_BaseConfig bmodel = new B_BaseConfig();
         BaseConfig   model  = bmodel.LoadConfig();
         SetBaseConfig(model);
     }
     else
     {
         B_BaseConfig_Supplier bmodel = new B_BaseConfig_Supplier();
         BaseConfig_Supplier   model  = bmodel.LoadConfig(Supplier_id);
         SetBaseConfig(model);
     }
 }