示例#1
0
        /// <summary>
        /// 万通卡登陆认证
        /// </summary>
        /// <returns></returns>
        public static string WintopLogin()
        {
            //万通卡登录认证
            WintopInterface  access = new WintopInterface();
            WintopLoginParam param  = new WintopLoginParam();

            param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); //交易时间  格式:YYYYMMDDHHMMSS
            param.servicename  = "DL001";                        //交易号 not null
            param.resqn        = SysBLL.getSerialNum();          //请求流水号 not null
            param.loginId      = SysBLL.getCpuNo();              //设备ID
            WintopLoginInfo info = access.WintopLogin(param);

            //同步系统时间
            SysBLL.SetSystemTime(info.msghead.trandatetime);
            if (info != null)
            {
                if (info.msgrsp != null)
                {
                    if (info.msgrsp.authcode != null)
                    {
                        SysBLL.Authcode = info.msgrsp.authcode;
                        return(info.msgrsp.authcode);
                    }
                }
            }
            return(null);
        }
示例#2
0
        /// <summary>
        /// 燃气卡认证登录
        /// </summary>
        /// <param name="loginParam"></param>
        /// <returns></returns>
        public string GasLogin()
        {
            GasLoginInfo info = null;
            Dictionary <String, String> parameters = new Dictionary <String, String>();

            try
            {
                parameters.Add("trandateTime", SysBLL.getYYYYMMDDHHMMSSTime());
                parameters.Add("servicename", "DL001");
                parameters.Add("reqsn", SysBLL.getSerialNum());
                parameters.Add("loginId", SysBLL.getCpuNo());

                string jsonText = jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("GasLoginName"), parameters, null);

                //反序列化JSON字符串,将JSON字符串转换成LIST列表
                info = JsonConvert.DeserializeObject <GasLoginInfo>(jsonText);
                //同步系统时间
                SysBLL.SetSystemTime(info.msghead.trandatetime);
                GasShowInfo.rqhints = info.msgtext.rqhints;
                if (info != null)
                {
                    if (info.msgrsp != null)
                    {
                        if (info.msgrsp.authcode != null)
                        {
                            return(info.msgrsp.authcode);
                        }
                    }
                }
            }catch (Exception ex) { log.Write("error:燃气登录认证异常:" + ex.Message); }
            return("");
        }
示例#3
0
        public static string ElecLogin()
        {
            //电力登录认证
            ElecInterface  access = new ElecInterface();
            ElecLoginParam param  = new ElecLoginParam();

            param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); //交易时间  格式:YYYYMMDDHHMMSS
            param.servicename  = "DL001";                        //交易号 not null
            param.reqsn        = SysBLL.getSerialNum();          //请求流水号 not null
            param.loginId      = SysBLL.getCpuNo();              //设备ID
            ElecLoginInfo info = access.ElecLogin(param);

            //同步系统时间
            SysBLL.SetSystemTime(info.msghead.trandatetime);
            if (info != null)
            {
                if (info.msgrsp != null)
                {
                    if (info.msgrsp.authcode != null)
                    {
                        return(info.msgrsp.authcode);
                    }
                }
            }
            return(null);
        }
示例#4
0
        /// <summary>
        /// 公交登陆认证
        /// </summary>
        /// <returns></returns>
        public static string BusLogin()
        {
            BusInterface  access = new BusInterface();
            BusLoginParam param  = new BusLoginParam();

            param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime();
            param.servicename  = "DL001";
            param.resqn        = SysBLL.getSerialNum();
            param.loginId      = SysBLL.getCpuNo(); //设备ID
            BusLoginInfo info = access.BusLogin(param);

            //同步系统时间
            SysBLL.SetSystemTime(info.msghead.trandatetime);
            if (info != null)
            {
                if (info.msgrsp != null)
                {
                    if (info.msgrsp.authcode != null)
                    {
                        return(info.msgrsp.authcode);
                    }
                }
            }
            return(null);
        }
示例#5
0
 /// <summary>
 /// 广电登录认证
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public static string BroadCasLogin()
 {
     log.Write("XXXXXXXXXXXXXX广电登录认证");
     try {
         BroadCasInterface  access = new BroadCasInterface();
         BroadCasLoginParam param  = new BroadCasLoginParam();
         param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime();
         param.servicename  = "DL001";
         param.reqsn        = SysBLL.getSerialNum();
         param.loginId      = SysBLL.getCpuNo(); //设备ID
         BroadCasLoginInfo info = access.BroadCasLogin(param);
         //同步系统时间
         SysBLL.SetSystemTime(info.msghead.trandatetime);
         if (info != null)
         {
             if (info.msgrsp != null)
             {
                 if (info.msgrsp.authcode != null)
                 {
                     return(info.msgrsp.authcode);
                 }
             }
         }
         return(null);
     }
     catch (Exception ex) { log.Write("广电登录失败:" + ex.Message); return(null); }
 }
示例#6
0
        /// <summary>
        /// 移动登录认证
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public string BroadCasLogin(MobileLoginParam param)
        {
            Dictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("trandateTime", param.trandateTime);
            parameters.Add("servicename", param.servicename);
            parameters.Add("reqsn", param.reqsn);
            parameters.Add("loginId", param.loginId);
            string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("mobileLogin"), parameters, null);

            //同步系统时间
            SysBLL.SetSystemTime(JsonConvert.DeserializeObject <BroadCasLoginInfo>(jsonText).msghead.trandatetime);
            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            return(JsonConvert.DeserializeObject <BroadCasLoginInfo>(jsonText).msgrsp.authcode);
        }
示例#7
0
        public static string UnicomLogin()
        {
            Dictionary <String, String> parameters = new Dictionary <String, String>();
            ElecLoginInfo elecLoginInfo            = null;

            parameters.Add("trandateTime", SysBLL.getYYYYMMDDHHMMSSTime());
            parameters.Add("servicename", "DL001");
            parameters.Add("reqsn", SysBLL.getSerialNum());
            parameters.Add("loginId", SysBLL.getCpuNo());

            string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("UnicomLoginName"), parameters, null);

            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            elecLoginInfo = JsonConvert.DeserializeObject <ElecLoginInfo>(jsonText);
            //同步系统时间
            SysBLL.SetSystemTime(elecLoginInfo.msghead.trandatetime);
            return(elecLoginInfo.msgrsp.authcode);
        }
示例#8
0
 /// <summary>
 /// 初始化资源,所有要用的资源都在这里加载,防止内存泄露
 /// </summary>
 private void initResouces()
 {
     //加载页面
     new ResourceInitialise().LoadForm();
     try
     {
         //上送版本号
         WtPayAccess.insertVersion();
         //设置系统时间
         SysBLL.SetSystemTime(BroadCasAccess.getSystemTime());
         //设备签到
         string mechineNo = ConfigurationManager.AppSettings["MechineNo"];
         SysBLL.MechineSign(mechineNo);
         //万通拉卡拉签到
         PayAccess.LklWtSign();
         //燃气注册表
         SysBLL.RunBat(System.AppDomain.CurrentDomain.BaseDirectory + SysConfigHelper.readerNode("regist"));
     }
     catch (Exception ex)
     {
         log.Write("error:MainWindow:weatherWorker_DoWork:" + ex.Message);
     }
 }