public static string iWrite(out string error)
        {
            error = null;
            string ip       = Config.dic("WIP");
            string user     = Config.dic("userid");
            string cityCode = Config.dic("cityCode");
            string password = Config.dic("password");

            //清远
            string name     = Config.dic("pName");
            string pPersion = Config.dic("pPersionID");
            string pDate    = Config.dic("pDate");
            string pPicture = Config.dic("pPicture");
            string pSsse    = Config.dic("pSsse");
            string prts     = string.Format("{0},{1},{2},{3},{4}", name, pPersion, pDate, "", pPicture);

            //肇庆
            //string name = Config.dic("pName");
            //string pPersion = Config.dic("pPersionID");
            //string pDate = Config.dic("pDate");
            //string pPicture = Config.dic("pPicture");
            //string pSsse = Config.dic("pSsse");
            //string prts = string.Format("{0},{1},{2},{3},{4}", name, pPersion, pDate, "", pPicture);
            NHMakeCard.MAKECARD makecar = new NHMakeCard.MAKECARD();
            //prts = "宋体|8.5|320|180,宋体|8.5|320|230,宋体|8.5|320|280,宋体|8.5|320|330,46|127|234|300";

            string result = makecar.iWrite(ip, user, password, "", cityCode, ReadIDCar.persionid, prts);

            Log.AddLog("WeiWang", "result:" + result);
            if (result.IndexOf("0,") == 0)
            {
                return(result);
            }
            else
            {
                //if (ip == null)
                //    return "ip null";
                //if (user == null)
                //    return "user null";
                //if (password == null)
                //    return "password null";
                //if (cityCode == null)
                //    return "cityCode null";
                //if (ReadIDCar.persionid == null)
                //    return "persionid null";
                //if (prts == null)
                //    return "prts null";
                //return result + "----" + ip +"----"+ user + "----" + password + "----" + "" + "----" + cityCode + "----" + ReadIDCar.persionid + "----" + prts;
                error = result;
                return(null);
            }
        }
        //             0        1      2    3       4
        //persionDatas:卡管地址\用户名\密码\城市代码\身份证
        public static string iWrite(string[] persionDatas, string prts)
        {
            string ip       = persionDatas[0]; // Config.dic("WIP");
            string user     = persionDatas[1]; //Config.dic("userid");
            string cityCode = persionDatas[3]; // Config.dic("cityCode");
            string password = persionDatas[2]; //Config.dic("password");

            Log.AddLog("制卡", "IP:" + ip);
            Log.AddLog("制卡", "user:"******"制卡", "citiCode:" + cityCode);
            Log.AddLog("制卡", "社会保障号:" + persionDatas[4]);
            Log.AddLog("制卡", "打印参数:" + prts);
            //string result = iWrite(ip, user, Config.dic("password"), "", cityCode, aac002, prts);
            NHMakeCard.MAKECARD makecar = new NHMakeCard.MAKECARD();
            //prts = "宋体|8.5|320|180,宋体|8.5|320|230,宋体|8.5|320|280,宋体|8.5|320|330,46|127|234|300";
            string result = makecar.iWrite(ip, user, password, "", cityCode, persionDatas[4], prts);

            Log.AddLog("制卡", "result:" + result);
            return(result);
        }