pos机抹零功能

时间:2022-06-01 15:29:06

抹零功能设置包括抹分-0、抹角-1、抹元-2。

前台界面和逻辑代码如下

pos机抹零功能

//抹零设置 2016/8/16  QT
            if (sweepCents.Checked==true)
            {
                BusinessClass.GlobalInfo.SettingSweepZero = ";
            }
            else if (sweepJiao.Checked==true)
            {
                BusinessClass.GlobalInfo.SettingSweepZero = ";
            }
            else
            {
                BusinessClass.GlobalInfo.SettingSweepZero = ";
            }

节点SettingSweepZero动态创建并且默认为抹分的功能代码

public class GlobalInfo
{
         /// <summary>
        ///  抹零设置 2016/8/16  QT
        /// </summary>
        public static string SettingSweepZero
        {          

            get {
                if (XMLConfig.ConfigFileOperate.GetConfigValue(Application.StartupPath + "\\AppConfig.config", "ZksrWMSSettings", "SettingSweepZero")== "" )
                {
                    CreateXmlConfig(");
                }
                return XMLConfig.ConfigFileOperate.GetConfigValue(Application.StartupPath + "\\AppConfig.config", "ZksrWMSSettings", "SettingSweepZero");
            }
            set
            {

                XMLConfig.ConfigFileOperate.SetConfigValue(Application.StartupPath + "\\AppConfig.config", "ZksrWMSSettings", "SettingSweepZero", value);
            }

        }

}