using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace PosDataTest
{
public class QualityHelper
{
#region 属性
///
/// 总部ip
///
public static string host_ip { get; set; }
///
/// 省份编码
///
public static string ProvinceCode { get; set; }
///
/// 服务器IP
///
public static string dbip { get; set; }
///
/// 数据库端口
///
public static string dbport { get; set; }
///
/// 数据库名
///
public static string dbname { get; set; }
///
/// 数据库用户名
///
public static string dbuser { get; set; }
///
/// 数据库密码
///
public static string dbpass { get; set; }
///
/// 数据库连接名
///
public static string conname { get; set; }
///
/// 服务区编码
///
public static string serverpartcode { get; set; }
///
/// 新的服务区码
///
public static string ServerPartCodeNew { get; set; }
///
/// 门店编码
///
public static string shopcode { get; set; }
///
/// 新的门店编码
///
public static string ShopCodeNew { get; set; }
///
/// 门店内码
///
public static string serverpartshop_id { get; set; }
///
/// 门店名称
///
public static string shopname { get; set; }
///
/// 门店业态
///
public static string businesstype { get; set; }
///
/// 条码类型
///
public static string BarcodeType { get; set; }
///
/// 收银机编码
///
public static string machinecode { get; set; }
///
/// 新的收银机编码
///
public static string MachineCodeNew { get; set; }
///
/// 收银员工号
///
public static string sellworkercode { get; set; }
///
/// 收银员姓名
///
public static string sellworkername { get; set; }
public static string Personsell { get; set; }
///
/// 系统版本号
///
public static string version { get; set; }
///
/// 软件名称
///
public static string softwarename { get; set; }
///
/// 文件路径
///
public static string orapath { get; set; }
///
/// 服务区名
///
public static string serverpartname { get; set; }
///
/// 票尾走纸行数
///
public static string paper_walk { get; set; }
///
/// 小票顶部广告
///
public static string adv_top { get; set; }
///
/// 小票尾部广告
///
public static string adv_end { get; set; }
///
/// 小票打印机开关
///
public static string paper_print { get; set; }
///
/// 默认钱箱开关
///
public static string cashbox_state { get; set; }
///
/// 是否打印小票退款用二维码
///
public static string PrintRefundQRCode { get; set; }
///
/// 顾客显示屏
///
public static string customer_display { get; set; }
///
/// 小票打印份数
///
public static string xpprint_num { get; set; }
///
/// 账单打印份数
///
public static string jbprint_num { get; set; }
///
/// 数据保留天数
///
public static string effective_day { get; set; }
///
/// 商品是否叠加
///
public static string commodity_overlay { get; set; }
///
/// 打印机端口
///
public static string printport { get; set; }
///
/// 启用折上折
///
public static string dbldiscount { get; set; }
///
/// 交易金额精确度
///
public static string price_accuracy { get; set; }
///
/// 桌号打印开关
///
public static string kitchenprint { get; set; }
///
/// 小票叠加
///
public static string bill_overlap { get; set; }
///
/// 支付最大面额
///
public static string max_denomination { get; set; }
///
/// 小票重打印
///
public static string bill_copy { get; set; }
///
/// 顾显端口
///
public static string dispcom { get; set; }
///
/// 单品数量上限
///
public static string sellcount { get; set; }
///
/// 客单金额上限
///
public static string factamount { get; set; }
///
/// 下载快捷键
///
public static string hotkeyset_download { get; set; }
///
/// 小票重打时间间隔
///
public static string ticket_copy { get; set; }
///
/// 上传校验时间间隔
///
public static string hour_space { get; set; }
///
/// 数据校验上传天数
///
public static string check_day { get; set; }
///
/// 结账数据上传天数
///
public static string endaccounttimes { get; set; }
///
/// 移动支付运营商
///
public static string MobilePayOperators { get; set; }
///
/// 移动支付直连模式
///
public static string MobilePayProxy { get; set; }
///
/// 小票重打超时间隔
///
public static string heavyprint_interval { get; set; }
///
/// 快捷键模式
///
public static string input_mode { get; set; }
///
/// webservice服务地址
///
public static string ServiceIP { get; set; }
///
/// webservice服务端口
///
public static string serviceport { get; set; }
///
/// 主支付通道端口
///
public static string serviceport1 { get; set; }
///
/// webservice备用服务端口1
///
public static string serviceport2 { get; set; }
///
/// webservice备用服务端口3
///
public static string serviceport3 { get; set; }
///
/// webservice备用服务端口4
///
public static string serviceport4 { get; set; }
///
/// webservice备用服务端口5
///
public static string serviceport5 { get; set; }
///
/// 主支付通道IP
///
public static string ServiceIP1 { get; set; }
///
/// webservice备用服务地址1
///
public static string ServiceIP2 { get; set; }
///
/// webservice备用服务地址3
///
public static string ServiceIP3 { get; set; }
///
/// webservice备用服务地址4
///
public static string ServiceIP4 { get; set; }
///
/// webservice备用服务地址5
///
public static string ServiceIP5 { get; set; }
///
/// 移动支付小票重复打印
///
public static string MobilePayCopy { get; set; }
///
/// 接口超时时间(秒)
///
public static string PayTimeOut { get; set; }
///
/// 数据传输服务端口
///
public static string DataServicePort { get; set; }
///
/// 会员服务地址
///
public static string member_ip { get; set; }
///
/// 会员服务端口
///
public static string member_port { get; set; }
///
/// 会员支付服务地址
///
public static string memberpay_ip { get; set; }
///
/// 会员支付服务端口
///
public static string memberpay_port { get; set; }
///
/// 稽核监控录像机IP
///
public static string NVR_IP { get; set; }
///
/// 稽核监控录像机端口
///
public static string NVR_PORT { get; set; }
public static string CheckDate { get; set; }
///
/// 进销存模式:1:在线;0:离线;
///
public static string OnLine { get; set; }
///
/// 客显模式:0:大屏;1:小屏;
///
public static string displayscreen { get; set; }
///
/// 登录版本
///
public static string IsTouch { get; set; }
///
/// mac地址
///
public static string macaddress { get; set; }
///
/// 授权码
///
public static string authorization { get; set; }
///
/// 移动支付商户号
///
public static string MerchantAuthorization { get; set; }
///
/// 标签贴(杯贴)打印开关
///
public static string LabelPrint { get; set; }
///
/// 标签贴打印机IP
///
public static string LabelPrintIP { get; set; }
///
/// 标签贴打印机端口
///
public static string LabelPrintPort { get; set; }
///
/// 厨打ip
///
public static string KitchenPrintIP { get; set; }
///
/// 厨打ip2
///
public static string KitchenPrintIP2 { get; set; }
///
/// 厨打ip3
///
public static string KitchenPrintIP3 { get; set; }
///
/// 厨打ip4
///
public static string KitchenPrintIP4 { get; set; }
///
/// 厨打端口号
///
public static string KitchenPrintPort { get; set; }
///
/// 厨打单行打印
///
public static string KitchenPrintRow { get; set; }
///
/// 通讯秤端口
///
public static string ScaleCom { get; set; }
///
/// 通讯秤开关
///
public static string ScaleState { get; set; }
///
/// 条码秤IP地址
///
public static string ScaleIP { get; set; }
///
/// 收银机名称
///
public static string machinename { get { return Dns.GetHostName(); } set { } }
///
/// 自动登录
///
public static string autologon { get; set; }
///
/// 扫码开关
///
public static string scaveng_switch { get; set; }
///
/// 广告开关
///
public static string VideoSwitch { get; set; }
///
/// 是否服务区版本(便利店移动支付使用本地接口)
///
public static string IsServerpart { get; set; }
///
/// 快速付款
///
public static string quick_sale { get; set; }
///
/// 组合支付开关
///
public static string MixedPayment { get; set; }
///
/// 触屏版是否使用商品自定义类别分组
///
public static string TypeGroup { get; set; }
///
/// 日结扫码上传地址
///
public static string EndAccountURL { get; set; }
///
/// 单品扫码上传地址
///
public static string CommoditySaleURL { get; set; }
///
/// 扫码稽核上传地址
///
public static string ScanAuditURL { get; set; }
///
/// 云服务API接口主地址
///
public static string CloudApiURL { get; set; }
///
/// 总部数据传输地址
///
public static string GeneralServiceURL { get; set; }
///
/// 会员储值卡
///
public static string mifare_card { get; set; }
///
/// 内置移动支付
///
public static string mobile_pay { get; set; }
///
/// 称重标识
///
public static string WeighSign { get; set; }
///
/// 未知商品销售
///
public static string UnknownSale { get; set; }
///
/// 录入会员价
///
public static string memberprice { get; set; }
///
/// 录入进货价
///
public static string StockPrice { get; set; }
///
/// 录入库存数
///
public static string StockCount { get; set; }
///
/// 无售价商品
///
public static string NoBarCode { get; set; }
///
/// 是否便利店版本
///
public static string IsGrocery { get; set; }
///
/// 定期清理数据
///
public static string data_delete { get; set; }
///
/// 允许退款
///
public static string refund { get; set; }
///
/// 快速结账
///
public static string fast_checkout { get; set; }
///
/// 密码开钱箱
///
public static string PassBox { get; set; }
///
/// 数据表配置
///
public static string threadconfigure { get; set; }
///
/// (便利店版)主机IP
///
public static string MainFrameIP { get; set; }
///
/// (便利店版)主机名
///
public static string MainFrameName { get; set; }
///
/// 优惠券付款
///
public static string Coupon { get; set; }
///
/// 开票开关
///
public static string invoice { get; set; }
///
/// 开票AppKey
///
public static string invoiceKey { get; set; }
///
/// 开票授权码
///
public static string invoiceAuthorization { get; set; }
///
/// 开票AppSecret
///
public static string invoiceSecret { get; set; }
///
/// 开票服务商
///
public static string InvoiceOperators { get; set; }
///
/// 开票税号
///
public static string InvoiceTaxNumber { get; set; }
///
/// 打印会员价
///
public static string PrintMember { get; set; }
///
/// 打印条形码
///
public static string PrintBarcode { get; set; }
///
/// 打印字体大小
///
public static string PrintSize { get; set; }
///
/// 打印方式
///
public static string PrintType { get; set; }
///
/// 双列左边距
///
public static string PageLeft { get; set; }
///
/// 双列右边距
///
public static string PageRight { get; set; }
///
/// 双列上边距
///
public static string PageTop { get; set; }
///
/// 双列下边距
///
public static string PageBottom { get; set; }
///
/// 打印列数
///
public static string PrintColumns { get; set; }
///
/// 单列左边距
///
public static string PageLeftI { get; set; }
///
/// 单列右边距
///
public static string PageRightI { get; set; }
///
/// 单列上边距
///
public static string PageTopI { get; set; }
///
/// 单列下边距
///
public static string PageBottomI { get; set; }
///
/// 广告下载地址
///
public static string advert_ip { get; set; }
///
/// 广告下载地址端口
///
public static string advert_port { get; set; }
///
/// 是否统计移动支付单品
///
public static string mobilepaysale { get; set; }
///
/// 连续单清次数
///
public static string deleterow_count { get; set; }
///
/// 每单必打时间间隔
///
public static string AvrBillSale { get; set; }
///
/// 企业会员
///
public static string enterprisevip { get; set; }
///
/// 配料开关
///
public static string IsMaterial { get; set; }
///
/// 在线订单
///
public static string OnlineOrder { get; set; }
///
/// 自然日结算
///
public static string NaturalDayAccount { get; set; }
///
/// 门店档口
///
public static string Stalls { get; set; }
///
/// 银行卡记账模式
///
public static string BankCard { get; set; }
///
/// 优惠券是否记营收
///
public static string IsTurnover { get; set; }
///
/// 电子优惠券记营收
///
public static string VipTurnover { get; set; }
///
/// 海鼎模式
///
public static string HDModelSwitch { get; set; }
///
/// 海鼎服务器IP
///
public static string HDdbip { get; set; }
///
/// 海鼎数据库端口
///
public static string HDdbport { get; set; }
///
/// 海鼎数据库名
///
public static string HDdbname { get; set; }
///
/// 海鼎数据库用户名
///
public static string HDdbuser { get; set; }
///
/// 海鼎数据库密码
///
public static string HDdbpass { get; set; }
///
/// 海鼎数据库连接名
///
public static string HDconname { get; set; }
///
/// 海鼎门店号
///
public static string HDshopcode { get; set; }
///
/// 海鼎机器号
///
public static string HDmaccode { get; set; }
///
/// 分析金额
///
public static string AnalysisAmount { get; set; }
///
/// 分析年龄
///
public static string AnalysisAge { get; set; }
///
/// 分析时间
///
public static string AnalysisTime { get; set; }
///
/// 商品会员价开关
///
public static string IsMemberPrice { get; set; }
///
/// 稽核营业额
///
public static string AuditRevenue { get; set; }
///
/// 稽核无视时间间隔
///
public static string AuditInterval { get; set; }
///
/// 微信推送服务主地址
/// 格式:
/// http://IP:Port
/// https://IP:Port
///
public static string WechatPushURL { get; set; }
///
/// 微信推送开关
///
public static string WechatPushSwitch { get; set; }
///
/// 电子餐盘功能开关
///
public static string RFIDServicePlate { get; set; }
///
/// 电子餐盘设备连接端口
///
public static string RFIDServicePlatePort { get; set; }
#endregion
public static void GetConfiguration()
{
try
{
using (DataTable _DataTable = ESSupport.Lib.SyBaseHelper.QueryOdbc(
"select configuration_name,configuration_values from t_configuration").Tables[0])
{
if (_DataTable.Rows.Count > 0)
{
foreach (DataRow row in _DataTable.Rows)
{
#region
switch (row["configuration_name"].ToString().ToLower())
{
case "server_ip":
dbip = row["configuration_values"].ToString();
break;
case "server_dbport":
dbport = row["configuration_values"].ToString();
break;
case "server_dbname":
dbname = row["configuration_values"].ToString();
break;
case "server_dbuser":
dbuser = row["configuration_values"].ToString();
break;
case "server_dbpass":
dbpass = row["configuration_values"].ToString();
break;
case "server_conname":
conname = row["configuration_values"].ToString();
break;
case "serverpartcode":
serverpartcode = row["configuration_values"].ToString();
break;
case "shopcode":
shopcode = row["configuration_values"].ToString();
break;
case "machinecode":
machinecode = row["configuration_values"].ToString();
break;
case "personsell":
Personsell = row["configuration_values"].ToString();
break;
case "version":
version = row["configuration_values"].ToString();
break;
case "softwarename":
softwarename = row["configuration_values"].ToString();
break;
case "orapath":
orapath = row["configuration_values"].ToString();
break;
case "serverpartname":
serverpartname = row["configuration_values"].ToString();
break;
case "mobilepayoperators":
MobilePayOperators = row["configuration_values"].ToString();
break;
case "service_port":
serviceport = row["configuration_values"].ToString();
break;
case "service_port2":
serviceport2 = row["configuration_values"].ToString();
break;
case "service_port1":
serviceport1 = row["configuration_values"].ToString();
break;
case "service_port3":
serviceport3 = row["configuration_values"].ToString();
break;
case "service_port4":
serviceport4 = row["configuration_values"].ToString();
break;
case "service_port5":
serviceport5 = row["configuration_values"].ToString();
break;
case "service_ip2":
ServiceIP2 = row["configuration_values"].ToString();
break;
case "service_ip1":
ServiceIP1 = row["configuration_values"].ToString();
break;
case "service_ip3":
ServiceIP3 = row["configuration_values"].ToString();
break;
case "service_ip4":
ServiceIP4 = row["configuration_values"].ToString();
break;
case "service_ip5":
ServiceIP5 = row["configuration_values"].ToString();
break;
case "mobilepaycopy":
MobilePayCopy = row["configuration_values"].ToString();
break;
case "online":
OnLine = row["configuration_values"].ToString();
break;
case "displayscreen":
displayscreen = row["configuration_values"].ToString();
break;
case "paper_walk":
paper_walk = row["configuration_values"].ToString();
break;
case "adv_top":
adv_top = row["configuration_values"].ToString();
break;
case "adv_end":
adv_end = row["configuration_values"].ToString();
break;
case "paper_print":
paper_print = row["configuration_values"].ToString();
break;
case "cashbox_state":
cashbox_state = row["configuration_values"].ToString();
break;
case "customer_display":
customer_display = row["configuration_values"].ToString();
break;
case "xpprint_num":
xpprint_num = row["configuration_values"].ToString();
break;
case "jbprint_num":
jbprint_num = row["configuration_values"].ToString();
break;
case "effective_day":
effective_day = row["configuration_values"].ToString();
break;
case "commodity_overlay":
commodity_overlay = row["configuration_values"].ToString();
break;
case "printport":
printport = row["configuration_values"].ToString();
break;
case "dbldiscount":
dbldiscount = row["configuration_values"].ToString();
break;
case "price_accuracy":
price_accuracy = row["configuration_values"].ToString();
break;
case "kitchenprint":
kitchenprint = row["configuration_values"].ToString();
break;
case "bill_overlap":
bill_overlap = row["configuration_values"].ToString();
break;
case "max_denomination":
max_denomination = row["configuration_values"].ToString();
break;
case "bill_copy":
bill_copy = row["configuration_values"].ToString();
break;
case "dispcom":
dispcom = row["configuration_values"].ToString();
break;
case "sellcount":
sellcount = row["configuration_values"].ToString();
break;
case "factamount":
factamount = row["configuration_values"].ToString();
break;
case "hotkeyset_download":
hotkeyset_download = row["configuration_values"].ToString();
break;
case "ticket_copy":
ticket_copy = row["configuration_values"].ToString();
break;
case "hour_space":
hour_space = row["configuration_values"].ToString();
break;
case "check_day":
check_day = row["configuration_values"].ToString();
break;
case "endaccounttimes":
endaccounttimes = row["configuration_values"].ToString();
break;
case "host_ip":
host_ip = row["configuration_values"].ToString();
break;
case "istouch":
IsTouch = row["configuration_values"].ToString();
break;
case "authorization":
authorization = row["configuration_values"].ToString();
break;
case "kitchenprintip":
KitchenPrintIP = row["configuration_values"].ToString();
break;
case "kitchenprintip2":
KitchenPrintIP2 = row["configuration_values"].ToString();
break;
case "kitchenprintip3":
KitchenPrintIP3 = row["configuration_values"].ToString();
break;
case "kitchenprintip4":
KitchenPrintIP4 = row["configuration_values"].ToString();
break;
case "kitchenprintrow":
KitchenPrintRow = row["configuration_values"].ToString();
break;
case "autologon":
autologon = row["configuration_values"].ToString();
break;
case "scaveng_switch":
scaveng_switch = row["configuration_values"].ToString();
break;
case "videoswitch":
VideoSwitch = row["configuration_values"].ToString();
break;
case "input_mode":
input_mode = row["configuration_values"].ToString();
break;
case "isserverpart":
IsServerpart = row["configuration_values"].ToString();
break;
case "service_ip":
ServiceIP = row["configuration_values"].ToString();
break;
case "dataserviceport":
DataServicePort = row["configuration_values"].ToString();
break;
case "quick_sale":
quick_sale = row["configuration_values"].ToString();
break;
case "endaccounturl":
EndAccountURL = row["configuration_values"].ToString();
break;
case "commoditysaleurl":
CommoditySaleURL = row["configuration_values"].ToString();
break;
case "scanauditurl":
ScanAuditURL = row["configuration_values"].ToString();
break;
case "mifare_card":
mifare_card = row["configuration_values"].ToString();
break;
case "mobile_pay":
mobile_pay = row["configuration_values"].ToString();
break;
case "member_ip":
member_ip = row["configuration_values"].ToString();
break;
case "member_port":
member_port = row["configuration_values"].ToString();
break;
case "memberpay_ip":
memberpay_ip = row["configuration_values"].ToString();
break;
case "memberpay_port":
memberpay_port = row["configuration_values"].ToString();
break;
case "weighsign":
WeighSign = row["configuration_values"].ToString();
break;
case "unknownsale":
UnknownSale = row["configuration_values"].ToString();
break;
case "memberprice":
memberprice = row["configuration_values"].ToString();
break;
case "stockprice":
StockPrice = row["configuration_values"].ToString();
break;
case "stockcount":
StockCount = row["configuration_values"].ToString();
break;
case "nobarcode":
NoBarCode = row["configuration_values"].ToString();
break;
case "isgrocery":
IsGrocery = row["configuration_values"].ToString();
break;
case "data_delete":
data_delete = row["configuration_values"].ToString();
break;
case "refund":
refund = row["configuration_values"].ToString();
break;
case "fast_checkout":
fast_checkout = row["configuration_values"].ToString();
break;
case "passbox":
PassBox = row["configuration_values"].ToString();
break;
case "threadconfigure":
threadconfigure = row["configuration_values"].ToString();
break;
case "mainframeip":
MainFrameIP = row["configuration_values"].ToString();
break;
case "mainframename":
MainFrameName = row["configuration_values"].ToString();
break;
case "coupon":
Coupon = row["configuration_values"].ToString();
break;
case "invoice":
invoice = row["configuration_values"].ToString();
break;
case "invoicekey":
invoiceKey = row["configuration_values"].ToString();
break;
case "invoiceauthorization":
invoiceAuthorization = row["configuration_values"].ToString();
break;
case "invoicesecret":
invoiceSecret = row["configuration_values"].ToString();
break;
case "printmember":
PrintMember = row["configuration_values"].ToString();
break;
case "printbarcode":
PrintBarcode = row["configuration_values"].ToString();
break;
case "printsize":
PrintSize = row["configuration_values"].ToString();
break;
case "printtype":
PrintType = row["configuration_values"].ToString();
break;
case "pageleft":
PageLeft = row["configuration_values"].ToString();
break;
case "pageright":
PageRight = row["configuration_values"].ToString();
break;
case "pagetop":
PageTop = row["configuration_values"].ToString();
break;
case "pagebottom":
PageBottom = row["configuration_values"].ToString();
break;
case "printcolumns":
PrintColumns = row["configuration_values"].ToString();
break;
case "pagelefti":
PageLeftI = row["configuration_values"].ToString();
break;
case "pagerighti":
PageRightI = row["configuration_values"].ToString();
break;
case "pagetopi":
PageTopI = row["configuration_values"].ToString();
break;
case "pagebottomi":
PageBottomI = row["configuration_values"].ToString();
break;
case "merchantauthorization":
MerchantAuthorization = row["configuration_values"].ToString();
break;
case "barcodetype":
BarcodeType = row["configuration_values"].ToString();
break;
case "advert_ip":
advert_ip = row["configuration_values"].ToString();
break;
case "advert_port":
advert_port = row["configuration_values"].ToString();
break;
case "mobilepaysale":
mobilepaysale = row["configuration_values"].ToString();
break;
case "deleterow_count":
deleterow_count = row["configuration_values"].ToString();
break;
case "avrbillsale":
AvrBillSale = row["configuration_values"].ToString();
break;
case "enterprisevip":
enterprisevip = row["configuration_values"].ToString();
break;
case "onlineorder":
OnlineOrder = row["configuration_values"].ToString();
break;
case "ismaterial":
IsMaterial = row["configuration_values"].ToString();
break;
case "paytimeout":
PayTimeOut = row["configuration_values"].ToString();
break;
case "labelprint":
LabelPrint = row["configuration_values"].ToString();
break;
case "labelprintip":
LabelPrintIP = row["configuration_values"].ToString();
break;
case "labelprintport":
LabelPrintPort = row["configuration_values"].ToString();
break;
case "scalecom":
ScaleCom = row["configuration_values"].ToString();
break;
case "scalestate":
ScaleState = row["configuration_values"].ToString();
break;
case "scaleip":
ScaleIP = row["configuration_values"].ToString();
break;
case "hdmodelswitch":
HDModelSwitch = row["configuration_values"].ToString();
break;
case "hddbip":
HDdbip = row["configuration_values"].ToString();
break;
case "hddbport":
HDdbport = row["configuration_values"].ToString();
break;
case "hddbname":
HDdbname = row["configuration_values"].ToString();
break;
case "hddbuser":
HDdbuser = row["configuration_values"].ToString();
break;
case "hddbpass":
HDdbpass = row["configuration_values"].ToString();
break;
case "hdconname":
HDconname = row["configuration_values"].ToString();
break;
case "hdshopcode":
HDshopcode = row["configuration_values"].ToString();
break;
case "hdmaccode":
HDmaccode = row["configuration_values"].ToString();
break;
case "provincecode":
ProvinceCode = row["configuration_values"].ToString();
break;
case "naturaldayaccount":
NaturalDayAccount = row["configuration_values"].ToString();
break;
case "stalls":
Stalls = row["configuration_values"].ToString();
break;
case "bankcard":
BankCard = row["configuration_values"].ToString();
break;
case "isturnover":
IsTurnover = row["configuration_values"].ToString();
break;
case "vipturnover":
VipTurnover = row["configuration_values"].ToString();
break;
case "mixedpayment":
MixedPayment = row["configuration_values"].ToString();
break;
case "typegroup":
TypeGroup = row["configuration_values"].ToString();
break;
case "analysisamount":
AnalysisAmount = row["configuration_values"].ToString();
break;
case "analysisage":
AnalysisAge = row["configuration_values"].ToString();
break;
case "analysistime":
AnalysisTime = row["configuration_values"].ToString();
break;
case "serverpartcodenew":
ServerPartCodeNew = row["configuration_values"].ToString();
break;
case "shopcodenew":
ShopCodeNew = row["configuration_values"].ToString();
break;
case "machinecodenew":
MachineCodeNew = row["configuration_values"].ToString();
break;
case "mobilepayproxy":
MobilePayProxy = row["configuration_values"].ToString();
break;
case "nvr_ip":
NVR_IP = row["configuration_values"].ToString();
break;
case "nvr_port":
NVR_PORT = row["configuration_values"].ToString();
break;
case "ismemberprice":
IsMemberPrice = row["configuration_values"].ToString();
break;
case "auditrevenue":
AuditRevenue = row["configuration_values"].ToString();
break;
case "auditinterval":
AuditInterval = row["configuration_values"].ToString();
break;
case "wechatpushurl":
WechatPushURL = row["configuration_values"].ToString();
break;
case "wechatpushswitch":
WechatPushSwitch = row["configuration_values"].ToString();
break;
case "rfidserviceplate":
RFIDServicePlate = row["configuration_values"].ToString();
break;
case "rfidserviceplateport":
RFIDServicePlatePort = row["configuration_values"].ToString();
break;
case "cloudapiurl":
CloudApiURL = row["configuration_values"].ToString();
break;
case "generalserviceurl":
GeneralServiceURL = row["configuration_values"].ToString();
break;
case "invoiceoperators":
InvoiceOperators = row["configuration_values"].ToString();
break;
case "printrefundqrcode":
PrintRefundQRCode = row["configuration_values"].ToString();
break;
case "invoicetaxnumber":
InvoiceTaxNumber = row["configuration_values"].ToString();
break;
}
#endregion
}
}
#region
InvoiceTaxNumber = string.IsNullOrWhiteSpace(InvoiceTaxNumber) ? "" : InvoiceTaxNumber;
PrintRefundQRCode = string.IsNullOrWhiteSpace(PrintRefundQRCode) ? "0" : PrintRefundQRCode;
InvoiceOperators = string.IsNullOrWhiteSpace(InvoiceOperators) ? "1001" : InvoiceOperators;
GeneralServiceURL = string.IsNullOrWhiteSpace(GeneralServiceURL) ? "" : GeneralServiceURL;
CloudApiURL = string.IsNullOrWhiteSpace(CloudApiURL) ? "http://api.eshangtech.com" : CloudApiURL;
RFIDServicePlate = string.IsNullOrWhiteSpace(RFIDServicePlate) ? "0" : RFIDServicePlate;
RFIDServicePlatePort = string.IsNullOrWhiteSpace(RFIDServicePlatePort) ? "COM1" : RFIDServicePlatePort;
memberpay_ip = string.IsNullOrWhiteSpace(memberpay_ip) ? "api.eshangtech.com" : memberpay_ip;
memberpay_port = string.IsNullOrWhiteSpace(memberpay_port) ? "80" : memberpay_port;
WechatPushSwitch = string.IsNullOrWhiteSpace(WechatPushSwitch) ? "0" : WechatPushSwitch;
WechatPushURL = string.IsNullOrWhiteSpace(WechatPushURL) ? "http://user.eshangtech.com" : WechatPushURL;
NVR_IP = string.IsNullOrWhiteSpace(NVR_IP) ? "" : NVR_IP;
NVR_PORT = string.IsNullOrWhiteSpace(NVR_PORT) ? "38800" : NVR_PORT;
AnalysisAmount = string.IsNullOrWhiteSpace(AnalysisAmount) ? "10" : AnalysisAmount;
AnalysisAge = string.IsNullOrWhiteSpace(AnalysisAge) ? "10" : AnalysisAge;
AnalysisTime = string.IsNullOrWhiteSpace(AnalysisTime) ? "60" : AnalysisTime;
TypeGroup = string.IsNullOrWhiteSpace(TypeGroup) ? "1" : TypeGroup;
MixedPayment = string.IsNullOrWhiteSpace(MixedPayment) ? "0" : MixedPayment;
VipTurnover = string.IsNullOrWhiteSpace(VipTurnover) ? "0" : VipTurnover;
IsTurnover = string.IsNullOrWhiteSpace(IsTurnover) ? "1" : IsTurnover;
BankCard = string.IsNullOrWhiteSpace(BankCard) ? "1" : BankCard;
ScaleIP = string.IsNullOrWhiteSpace(ScaleIP) ? "" : ScaleIP;
ScaleCom = string.IsNullOrWhiteSpace(ScaleCom) ? "COM1" : ScaleCom;
ScaleState = string.IsNullOrWhiteSpace(ScaleState) ? "0" : ScaleState;
LabelPrint = string.IsNullOrWhiteSpace(LabelPrint) ? "0" : LabelPrint;
LabelPrintIP = string.IsNullOrWhiteSpace(LabelPrintIP) ? "" : LabelPrintIP;
LabelPrintPort = string.IsNullOrWhiteSpace(LabelPrintPort) ? "9100" : LabelPrintPort;
serverpartname = string.IsNullOrWhiteSpace(serverpartname) ? "服务区" : serverpartname;
serverpartcode = string.IsNullOrWhiteSpace(serverpartcode) ? "" : serverpartcode;
ServerPartCodeNew = string.IsNullOrWhiteSpace(ServerPartCodeNew) ? serverpartcode : ServerPartCodeNew;
shopcode = string.IsNullOrWhiteSpace(shopcode) ? "" : shopcode;
ShopCodeNew = string.IsNullOrWhiteSpace(ShopCodeNew) ? shopcode : ShopCodeNew;
machinecode = string.IsNullOrWhiteSpace(machinecode) ? "" : machinecode;
MachineCodeNew = string.IsNullOrWhiteSpace(MachineCodeNew) ? machinecode : MachineCodeNew;
dbip = string.IsNullOrWhiteSpace(dbip) ? "" : dbip;
host_ip = string.IsNullOrWhiteSpace(host_ip) ? "cloud.eshangtech.com" : host_ip;
input_mode = string.IsNullOrWhiteSpace(input_mode) ? "0" : input_mode;
ServiceIP = string.IsNullOrWhiteSpace(ServiceIP) ? dbip : ServiceIP;
ServiceIP1 = string.IsNullOrWhiteSpace(ServiceIP1) ? "" : ServiceIP1;
ServiceIP2 = string.IsNullOrWhiteSpace(ServiceIP2) ? "" : ServiceIP2;
ServiceIP3 = string.IsNullOrWhiteSpace(ServiceIP3) ? "" : ServiceIP3;
ServiceIP4 = string.IsNullOrWhiteSpace(ServiceIP4) ? "" : ServiceIP4;
ServiceIP5 = string.IsNullOrWhiteSpace(ServiceIP5) ? "" : ServiceIP5;
MobilePayCopy = string.IsNullOrWhiteSpace(MobilePayCopy) ? "0" : MobilePayCopy;
serviceport = string.IsNullOrWhiteSpace(serviceport) ? "7080" : serviceport;
serviceport1 = string.IsNullOrWhiteSpace(serviceport1) ? serviceport : serviceport1;
serviceport2 = string.IsNullOrWhiteSpace(serviceport2) ? serviceport : serviceport2;
serviceport3 = string.IsNullOrWhiteSpace(serviceport3) ? serviceport : serviceport3;
serviceport4 = string.IsNullOrWhiteSpace(serviceport4) ? serviceport : serviceport4;
serviceport5 = string.IsNullOrWhiteSpace(serviceport5) ? serviceport : serviceport5;
MobilePayOperators = string.IsNullOrWhiteSpace(MobilePayOperators) ? "1002" : MobilePayOperators;
MobilePayProxy = string.IsNullOrWhiteSpace(MobilePayProxy) ? "0" : MobilePayProxy;
MerchantAuthorization = string.IsNullOrWhiteSpace(MerchantAuthorization) ? "" : MerchantAuthorization;
IsServerpart = string.IsNullOrWhiteSpace(IsServerpart) ? "1" : IsServerpart;
softwarename = string.IsNullOrWhiteSpace(softwarename) ? "驿商统一收银系统" : softwarename;
EndAccountURL = string.IsNullOrWhiteSpace(EndAccountURL) ? "" : EndAccountURL;
CommoditySaleURL = string.IsNullOrWhiteSpace(CommoditySaleURL) ? "" : CommoditySaleURL;
ScanAuditURL = string.IsNullOrWhiteSpace(ScanAuditURL) ? "" : ScanAuditURL;
paper_walk = string.IsNullOrWhiteSpace(paper_walk) ? "6" : paper_walk;
adv_top = string.IsNullOrWhiteSpace(adv_top) ? "" : adv_top;
adv_end = string.IsNullOrWhiteSpace(adv_end) ? "" : adv_end;
paper_print = string.IsNullOrWhiteSpace(paper_print) ? "1" : paper_print;
cashbox_state = string.IsNullOrWhiteSpace(cashbox_state) ? "1" : cashbox_state;
displayscreen = string.IsNullOrWhiteSpace(displayscreen) ? "0" : displayscreen;
xpprint_num = string.IsNullOrWhiteSpace(xpprint_num) ? "1" : xpprint_num;
jbprint_num = string.IsNullOrWhiteSpace(jbprint_num) ? "2" : jbprint_num;
effective_day = string.IsNullOrWhiteSpace(effective_day) ? "60" : effective_day;
commodity_overlay = string.IsNullOrWhiteSpace(commodity_overlay) ? "0" : commodity_overlay;
printport = string.IsNullOrWhiteSpace(printport) ? "LPT1" : printport;
dbldiscount = string.IsNullOrWhiteSpace(dbldiscount) ? "0" : dbldiscount;
price_accuracy = string.IsNullOrWhiteSpace(price_accuracy) ? "1" : price_accuracy;
kitchenprint = string.IsNullOrWhiteSpace(kitchenprint) ? "0" : kitchenprint;
bill_overlap = string.IsNullOrWhiteSpace(bill_overlap) ? "1" : bill_overlap;
max_denomination = string.IsNullOrWhiteSpace(max_denomination) ? "100" : max_denomination;
quick_sale = string.IsNullOrWhiteSpace(quick_sale) ? "0" : quick_sale;
mifare_card = string.IsNullOrWhiteSpace(mifare_card) ? "0" : mifare_card;
hotkeyset_download = string.IsNullOrWhiteSpace(hotkeyset_download) ? "1" : hotkeyset_download;
mobile_pay = string.IsNullOrWhiteSpace(mobile_pay) ? "1" : mobile_pay;
check_day = string.IsNullOrWhiteSpace(check_day) ? "3" : check_day;
dispcom = string.IsNullOrWhiteSpace(dispcom) ? "2" : dispcom;
conname = string.IsNullOrWhiteSpace(conname) ? "orcl" : conname;
dbpass = string.IsNullOrWhiteSpace(dbpass) ? "qrwl" : dbpass;
dbuser = string.IsNullOrWhiteSpace(dbuser) ? "highway_exchange" : dbuser;
dbname = string.IsNullOrWhiteSpace(dbname) ? "highway_exchange" : dbname;
dbport = string.IsNullOrWhiteSpace(dbport) ? "1521" : dbport;
DataServicePort = string.IsNullOrWhiteSpace(DataServicePort) ? "7080" : DataServicePort;
ticket_copy = string.IsNullOrWhiteSpace(ticket_copy) ? "5" : ticket_copy;
sellcount = string.IsNullOrWhiteSpace(sellcount) ? "20" : sellcount;
factamount = string.IsNullOrWhiteSpace(factamount) ? "300" : factamount;
bill_copy = string.IsNullOrWhiteSpace(bill_copy) ? "1" : bill_copy;
OnLine = string.IsNullOrWhiteSpace(OnLine) ? "0" : OnLine;
customer_display = string.IsNullOrWhiteSpace(customer_display) ? "1" : customer_display;
heavyprint_interval = string.IsNullOrWhiteSpace(heavyprint_interval) ? "30" : heavyprint_interval;
IsTouch = string.IsNullOrWhiteSpace(IsTouch) ? "0" : IsTouch;
macaddress = ESSupport.Lib.PCHelper.GetMacAddressByNetworkInformation();
authorization = string.IsNullOrWhiteSpace(authorization) ? "" : authorization;
KitchenPrintPort = string.IsNullOrWhiteSpace(KitchenPrintPort) ? "9100" : KitchenPrintPort;
KitchenPrintIP = string.IsNullOrWhiteSpace(KitchenPrintIP) ? "192.168.123.100" : KitchenPrintIP;
KitchenPrintIP2 = string.IsNullOrWhiteSpace(KitchenPrintIP2) ? KitchenPrintIP : KitchenPrintIP2;
KitchenPrintIP3 = string.IsNullOrWhiteSpace(KitchenPrintIP3) ? KitchenPrintIP : KitchenPrintIP3;
KitchenPrintIP4 = string.IsNullOrWhiteSpace(KitchenPrintIP4) ? KitchenPrintIP : KitchenPrintIP4;
KitchenPrintRow = string.IsNullOrWhiteSpace(KitchenPrintRow) ? "1" : KitchenPrintRow;
autologon = string.IsNullOrWhiteSpace(autologon) ? "0" : autologon;
scaveng_switch = string.IsNullOrWhiteSpace(scaveng_switch) ? "0" : scaveng_switch;
VideoSwitch = string.IsNullOrWhiteSpace(VideoSwitch) ? "1" : VideoSwitch;
WeighSign = string.IsNullOrWhiteSpace(WeighSign) ? "21" : WeighSign;
UnknownSale = string.IsNullOrWhiteSpace(UnknownSale) ? "0" : UnknownSale;
memberprice = string.IsNullOrWhiteSpace(memberprice) ? "0" : memberprice;
StockPrice = string.IsNullOrWhiteSpace(StockPrice) ? "0" : StockPrice;
StockCount = string.IsNullOrWhiteSpace(StockCount) ? "0" : StockCount;
NoBarCode = string.IsNullOrWhiteSpace(NoBarCode) ? "0" : NoBarCode;
IsGrocery = string.IsNullOrWhiteSpace(IsGrocery) ? "0" : IsGrocery;
data_delete = string.IsNullOrWhiteSpace(data_delete) ? "0" : data_delete;
refund = string.IsNullOrWhiteSpace(refund) ? "1" : refund;
fast_checkout = string.IsNullOrWhiteSpace(fast_checkout) ? "1" : fast_checkout;
PassBox = string.IsNullOrWhiteSpace(PassBox) ? "1" : PassBox;
threadconfigure = string.IsNullOrWhiteSpace(threadconfigure) ? "" : threadconfigure;
MainFrameIP = string.IsNullOrWhiteSpace(MainFrameIP) ? "" : MainFrameIP;
MainFrameName = string.IsNullOrWhiteSpace(MainFrameName) ? "" : MainFrameName;
Coupon = string.IsNullOrWhiteSpace(Coupon) ? "0" : Coupon;
invoice = string.IsNullOrWhiteSpace(invoice) ? "0" : invoice;
invoiceKey = string.IsNullOrWhiteSpace(invoiceKey) ? "" : invoiceKey;
invoiceAuthorization = string.IsNullOrWhiteSpace(invoiceAuthorization) ? "" : invoiceAuthorization;
invoiceSecret = string.IsNullOrWhiteSpace(invoiceSecret) ? "" : invoiceSecret;
PrintMember = string.IsNullOrWhiteSpace(PrintMember) ? "1" : PrintMember;
PrintBarcode = string.IsNullOrWhiteSpace(PrintBarcode) ? "1" : PrintBarcode;
PrintSize = string.IsNullOrWhiteSpace(PrintSize) ? "10号细体" : PrintSize;
PrintType = string.IsNullOrWhiteSpace(PrintType) ? "1" : PrintType;
PageLeft = string.IsNullOrWhiteSpace(PageLeft) ? "0" : PageLeft;
PageRight = string.IsNullOrWhiteSpace(PageRight) ? "0" : PageRight;
PageTop = string.IsNullOrWhiteSpace(PageTop) ? "0" : PageTop;
PageBottom = string.IsNullOrWhiteSpace(PageBottom) ? "0" : PageBottom;
PrintColumns = string.IsNullOrWhiteSpace(PrintColumns) ? "单列" : PrintColumns;
PageLeftI = string.IsNullOrWhiteSpace(PageLeftI) ? "0" : PageLeftI;
PageRightI = string.IsNullOrWhiteSpace(PageRightI) ? "0" : PageRightI;
PageTopI = string.IsNullOrWhiteSpace(PageTopI) ? "0" : PageTopI;
PageBottomI = string.IsNullOrWhiteSpace(PageBottomI) ? "0" : PageBottomI;
//heavyprint_interval = heavyprint_interval == null ? "5" : heavyprint_interval;
BarcodeType = string.IsNullOrWhiteSpace(BarcodeType) ? "1001" : BarcodeType;
advert_ip = string.IsNullOrWhiteSpace(advert_ip) ? "" : advert_ip;
advert_port = string.IsNullOrWhiteSpace(advert_port) ? "" : advert_port;
mobilepaysale = string.IsNullOrWhiteSpace(mobilepaysale) ? "0" : mobilepaysale;
deleterow_count = string.IsNullOrWhiteSpace(deleterow_count) ? "3" : deleterow_count;
AvrBillSale = string.IsNullOrWhiteSpace(AvrBillSale) ? "5" : AvrBillSale;
enterprisevip = string.IsNullOrWhiteSpace(enterprisevip) ? "0" : enterprisevip;
OnlineOrder = string.IsNullOrWhiteSpace(OnlineOrder) ? "0" : OnlineOrder;
IsMaterial = string.IsNullOrWhiteSpace(IsMaterial) ? "0" : IsMaterial;
PayTimeOut = string.IsNullOrWhiteSpace(PayTimeOut) ? "30" : PayTimeOut;
HDModelSwitch = string.IsNullOrWhiteSpace(HDModelSwitch) ? "0" : HDModelSwitch;
HDdbip = string.IsNullOrWhiteSpace(HDdbip) ? "" : HDdbip;
HDdbport = string.IsNullOrWhiteSpace(HDdbport) ? "" : HDdbport;
HDdbname = string.IsNullOrWhiteSpace(HDdbname) ? "" : HDdbname;
HDdbuser = string.IsNullOrWhiteSpace(HDdbuser) ? "" : HDdbuser;
HDdbpass = string.IsNullOrWhiteSpace(HDdbpass) ? "" : HDdbpass;
HDconname = string.IsNullOrWhiteSpace(HDconname) ? "" : HDconname;
HDshopcode = string.IsNullOrWhiteSpace(HDshopcode) ? "" : HDshopcode;
HDmaccode = string.IsNullOrWhiteSpace(HDmaccode) ? "" : HDmaccode;
ProvinceCode = string.IsNullOrWhiteSpace(ProvinceCode) ? "330000" : ProvinceCode;
NaturalDayAccount = string.IsNullOrWhiteSpace(NaturalDayAccount) ? "0" : NaturalDayAccount;
Stalls = string.IsNullOrWhiteSpace(Stalls) ? "0" : Stalls;
IsMemberPrice = string.IsNullOrWhiteSpace(IsMemberPrice) ? "0" : IsMemberPrice;
AuditRevenue = string.IsNullOrWhiteSpace(AuditRevenue) ? "0" : AuditRevenue;
AuditInterval = string.IsNullOrWhiteSpace(AuditInterval) ? "0" : AuditInterval;
try
{
if (decimal.Parse(PayTimeOut) < 10)
{
PayTimeOut = "30";
}
}
catch
{
PayTimeOut = "30";
}
#endregion
}
}
catch (Exception ex)
{
ESSupport.Lib.LogHelper.WriteServiceLog("配置初始化异常:" + ex.Message);
}
}
public static bool GetDate()
{
try
{
DataTable _ShopMessage = ESSupport.Lib.SyBaseHelper.QueryOdbc("select serverpartshop_id,shopname,businesstype " +
"from t_shopmessage where serverpartcode = '" + serverpartcode +
"' and shopcode = '" + shopcode + "'").Tables[0];
if (_ShopMessage.Rows.Count > 0)
{
serverpartshop_id = _ShopMessage.Rows[0]["serverpartshop_id"].ToString();
shopname = _ShopMessage.Rows[0]["shopname"].ToString();
businesstype = _ShopMessage.Rows[0]["businesstype"].ToString();
return true;
}
}
catch (Exception ex)
{
ESSupport.Lib.LogHelper.WriteServiceLog("门店信息初始化失败:" + ex.Message);
}
return false;
}
#region 获取配置信息
///
/// 获取配置信息
///
/// 配置名称
/// 无配置信息时默认值
///
public static string ConfigurationValues(string ConfigUrationName, string defaultValue)
{
string strSQL = "select configuration_name,configuration_values from dba.t_configuration where lower(configuration_name) = lcase('" + ConfigUrationName + "')";
string strValues = "";
try
{
using (DataTable _DataTable = ESSupport.Lib.SyBaseHelper.QueryOdbc(strSQL).Tables[0])
{
if (_DataTable.Rows.Count > 0)
{
foreach (DataRow row in _DataTable.Rows)
{
if (row["configuration_name"].ToString().ToLower() == ConfigUrationName.ToLower())
{
strValues = row["configuration_values"].ToString();
}
}
}
}
}
catch
{
strValues = defaultValue;
}
return strValues;
}
#endregion
}
}