public String GetPrice2Pay()
        {
            String price_t = this.GetProperty("price2pay", PrintRecordItem.PriceNone);

            if (LibCui.IsStringNeg(price_t))
            {
                return(PrintRecordItem.PriceNone);
            }
            else
            {
                return(price_t);
            }
        }
Пример #2
0
        /**
         * 根据打印方式,计算价格
         */
        public String GetPrice()
        {
            lock (this) {
                if (string.IsNullOrEmpty(this._FileFullPath))
                {
                    //没有文件
                    return(PriceNone);
                }

                if (LibCui.IsStringNeg(this._Price))
                {
                    //价格没有设置

                    // public int    _PParamcopies =0;//份数
                    //public bool _PParamcolor = false;//彩打
                    //public String _PParamRange = "null";//打印范围
                    //public bool _PParam2Paper = false;//双面

                    //  double price_t=_PParamcopies* (_PParamcolor==true?0.1:0.1)*

                    int Pages = FilePages.GetFilePages(this._FileFullPath);
                    //页数*价格*份数

                    double Duplex = (_PParam2Paper == true) ? 1.1 : 1.0;
                    double Color  = (_PParamcolor == true) ? 1.1 : 1.0;

                    double Total_money = Pages * 0.1 * _PParamcopies * Duplex * Color;



                    return(this._Price = Total_money.ToString("0.00"));
                }
                else
                {
                    return(this._Price);
                }
                // return PriceNone;
            }
        }