public void Call(DmType dmtype, string callstring) { //InitCom(); //string StrMain = callstring; //if ( dmtype == DmType.姓名 ) //{ // StrMain = "姓名:" + callstring; //} //if ( dmtype == DmType.应收 ) //{ // StrMain = dmtype.ToString() + ":" + callstring; //} //if ( dmtype == DmType.实收 ) //{ // StrMain = dmtype.ToString() + ":" + callstring; //} //if ( dmtype == DmType.找零 ) //{ // StrMain = dmtype.ToString() + ":" + callstring; //} //if ( dmtype == DmType.欢迎 ) //{ // if ( callstring == "抱歉,暂停工作" ) // StrMain = "抱歉,暂停工作"; // else // { // //DispDefaultData(); // //return; // StrMain = "您好"; // } //} //if ( dmtype == DmType.清除 ) //{ // StopPost(); // StrMain = "您好"; //} //int ret2 = SendDataChar( StrMain , FontName , xColor , F_Width , F_Height , // LeftSpa , TopSpa , WordSpa , RowSpa , EnterMode , ExitMode , EnterSpeed , ExitSpeed , StopTime ); aa a = new aa(dmtype, callstring); if (dmtype == DmType.应收 || dmtype == DmType.实收) { Thread t = new Thread(new ThreadStart(a.call)); t.Start(); } else { a.call(); } }
public void Call(DmType dmtype, string callstring) { int ncom = Convert.ToInt32(com); IntPtr intp; int result = -1; result = SetComNo(ncom); if (dmtype == DmType.清除) { MagicClear(2); } if (dmtype == DmType.姓名) { intp = SetFontSize(16); intp = LocStringDisplay(10, 10, "姓名:" + callstring); } if (dmtype == DmType.应收) { MagicClear(2); AllClear(); intp = SetFontSize(10); intp = LocStringDisplay(10, 10, "应收:" + callstring); int r = PlayWaves("请您付款"); bool bol = RMB2Wav(Convert.ToDouble(callstring)); } }
public void Call(DmType dmtype, string callstring) { ts_Caller.ts_call_AxCL2005_16W caller = new ts_Caller.ts_call_AxCL2005_16W(); int i = SetTransMode(2, 3); //通讯设置 i = SetSerialPortPara(1, Convert.ToInt32(com), 115200); //设置串口通讯 StartSend(); //构建节目结构 i = AddControl(1, 1); //添加屏幕 i = AddProgram(1, 1, 0); //添加节目 string str = ""; if (callstring == "您好,欢迎光临") { SendScreenPara(1, 1, 128, 32);//设置屏幕参数 str = "祝您早日康复"; } else if (dmtype == DmType.姓名) { str = "姓名:" + callstring; caller.Call(str);// jianqg 2013-4-11 增加 郴州妇幼需求 必须呼叫姓名 } else if (dmtype == DmType.应收) { str = "应收:" + callstring + "元"; caller.Call(str); } else { str = callstring; } i = AddLnTxtString(1, 1, 1, 0, 0, 128, 32, str, "宋体", 16, 255, false, false, false, 1, 20, 1); //添加单行文本 Thread.Sleep(100); //程序需要休眠100毫秒 才能 最好的显示到LED屏幕上 i = SendControl(1, 1, IntPtr.Zero); //发送端口数据 }
/// <summary> /// 报价显示(浦鑫这个方法同Call(DmType dmtype, string callstring)) /// </summary> /// <param name="dmtype">枚举类型</param> /// <param name="callstring">显示字符串</param> /// <param name="je">金额(浦鑫暂不处理)</param> public void Call(DmType dmtype, string callstring, double je)//Add by Tany 2010-07-25 { if (dmtype == DmType.找零) { Call(dmtype, je.ToString("0.00")); } else { Call(dmtype, callstring); } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { if (dmtype == DmType.找零) { Call(dmtype, je.ToString("0.00")); } else { Call(dmtype, callstring); } }
/// <summary> /// 药房发药 /// </summary> /// <param name="dmtype"></param> /// <param name="callstring"></param> /// <param name="je"></param> /// <param name="CFMX"></param> public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { if (dmtype == DmType.发药呼叫) { try { if (isRegChannel == 0) { ChannelServices.RegisterChannel(new TcpClientChannel(), false); isRegChannel = 1; } } catch (Exception ex) { isRegChannel = 0; } try { obj = (ILedShow)Activator.GetObject(typeof(ILedShow), tcpIp + "LED"); if (obj != null) { obj.SendMessage(CFMX[0].brxm, showWind, WindCode, CFMX[0].deptid.ToString()); } //string patientName = ""; //string ssql = "select '' "; //if (dmtype == DmType.发药) //{ // patientName = "发药窗口" + CFMX[0].fyck + "正在为" + callstring + "发药 ";//+ "总金额为:" + je.ToString()+"元"; // //Display(patientName, 1); //} //string ss = "请" + CFMX[0].brxm + "到" + CFMX[0].fyck + "来取药"; } catch (Exception er) { } } //if (dmtype == DmType.欢迎) //{ // Get_Window_List(); //} //if (dmtype == DmType.卡充值) //{ // Send_Reset(); //} //if (dmtype == DmType.清除) //{ // Delete_File(); //} }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { InitCom(); try { string StrMain = ""; if (dmtype == DmType.姓名) { StopPost(); StrMain = callstring + ":" + je.ToString(); //SendDataChar(StrMain, FontName, xColor, F_Width, F_Height, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); SendDataChar(StrMain, FontName, xColor, 16, 0, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); System.Threading.Thread.Sleep(1 * 1500); bb b = new bb(callstring, je.ToString(), CFMX); b.Th = currentThread; b.call(); //Thread t = new Thread( new ThreadStart( b.call ) ); //t.Start(); } else if (dmtype == DmType.找零) { StrMain = callstring + Convert.ToString(Math.Abs(je)); SendDataChar(StrMain, FontName, xColor, F_Width, F_Height, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); } else if (dmtype == DmType.实收) { string ss = ""; if (je >= 0) { ss = "实收"; } else { ss = "退款"; } StrMain = ss + ":" + Convert.ToString(Math.Abs(je)); SendDataChar(StrMain, FontName, xColor, F_Width, F_Height, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); } else { Call(dmtype, callstring); } } catch (System.Exception err) { //throw new Exception(err.Message); } }
//led报价器 /// <summary> /// 显示屏显示 /// </summary> /// <param name="dmtype"></param> /// <param name="callstring"></param> public void Call(DmType dmtype, string callstring) { try { string ncom = com; if (Convertor.IsNumeric(ncom) == false) { ncom = "1"; } if (dmtype == DmType.姓名) { Display("姓名:" + callstring, 0); } if (dmtype == DmType.应收) { Display("应收:" + callstring, Convert.ToDouble(callstring)); } if (dmtype == DmType.实收) { Display("实收:" + callstring, Convert.ToDouble(callstring)); } if (dmtype == DmType.找零) { Display("找零:" + callstring, Convert.ToDouble(callstring)); } if (dmtype == DmType.欢迎) { if (callstring == "抱歉,暂停工作") { Display("本窗口暂停工作", 0); } else { Display("祝您早日康复", 0); } } if (dmtype == DmType.清除) { Display("祝您早日康复", 0); } } catch (System.Exception err) { throw new Exception(err.Message); } }
//led报价器 /// <summary> /// 显示屏显示 /// </summary> /// <param name="dmtype"></param> /// <param name="callstring"></param> public void Call(DmType dmtype, string callstring) { try { int ncom = Convert.ToInt32(com); if (dmtype == DmType.姓名) { dsbdll(ncom, "$1"); dsbdll(ncom, "#姓名:" + callstring + "#"); } if (dmtype == DmType.应收) { dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "J"); } if (dmtype == DmType.实收) { dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "Y"); } if (dmtype == DmType.找零) { dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "Z"); } if (dmtype == DmType.欢迎) { if (callstring == "抱歉,暂停工作") { dsbdll(ncom, "W"); } else { dsbdll(ncom, "F"); } } if (dmtype == DmType.清除) { dsbdll(ncom, "F"); } } catch (System.Exception err) { throw new Exception(err.Message); } }
//led报价器 /// <summary> /// 显示屏显示 /// </summary> /// <param name="dmtype"></param> /// <param name="callstring"></param> public void Call(DmType dmtype, string callstring) { try { string ncom = com; bool bok = false; bok = VFD8C_LED8C_OpenCom(Convert.ToInt32(ncom)); if (dmtype == DmType.姓名) { // DisFun(ncom, "" + callstring, 0); VFD8C_LED8C_Reset(); } if (dmtype == DmType.应收) { VFD8C_LED8C_DisplayChar(2); VFD8C_LED8C_DisplayNum(callstring); } if (dmtype == DmType.实收) { VFD8C_LED8C_DisplayChar(3); VFD8C_LED8C_DisplayNum(callstring); } if (dmtype == DmType.找零) { VFD8C_LED8C_DisplayChar(4); VFD8C_LED8C_DisplayNum(callstring); } if (dmtype == DmType.欢迎) { } if (dmtype == DmType.清除) { VFD8C_LED8C_Reset(); } VFD8C_LED8C_CloseCom(); } catch (System.Exception err) { throw new Exception(err.Message); } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { try { string ncom = com; VFD8C_LED8C_OpenCom(Convert.ToInt32(ncom)); if (dmtype == DmType.姓名) { VFD8C_LED8C_Reset(); } else if (dmtype == DmType.找零) { VFD8C_LED8C_DisplayChar(4); VFD8C_LED8C_DisplayNum(je.ToString()); } else if (dmtype == DmType.实收) { string ss = ""; if (je >= 0) { ss = "实收"; VFD8C_LED8C_DisplayChar(3); VFD8C_LED8C_DisplayNum(je.ToString()); } else { ss = "退款"; VFD8C_LED8C_DisplayChar(3); VFD8C_LED8C_DisplayNum(je.ToString()); } //DisFun(ncom, ss, Math.Abs(je)); } else { Call(dmtype, callstring); } VFD8C_LED8C_CloseCom(); } catch (System.Exception err) { throw new Exception(err.Message); } }
//led报价器 /// <summary> /// 显示屏显示 /// </summary> /// <param name="dmtype"></param> /// <param name="callstring"></param> public void Call(DmType dmtype, string callstring) { try { string ncom = com; if (dmtype == DmType.姓名) { DisFun(ncom, "" + callstring, 0); } if (dmtype == DmType.应收) { DisFun(ncom, "应收", Convert.ToDouble(callstring)); } if (dmtype == DmType.实收) { DisFun(ncom, "实收", Convert.ToDouble(callstring)); } if (dmtype == DmType.找零) { DisFun(ncom, "找零", Convert.ToDouble(callstring)); } if (dmtype == DmType.欢迎) { if (callstring == "抱歉,暂停工作") { DisFun(ncom, "暂停工作", 0); } else { DisFun(ncom, "您好", 0); } } if (dmtype == DmType.清除) { DisFun(ncom, "您好", 0); } } catch (System.Exception err) { throw new Exception(err.Message); } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { if (string.IsNullOrEmpty(WindowNum) || string.IsNullOrEmpty(Mac) || string.IsNullOrEmpty(Brkh)) { return; } if (Qyzt != 1 && Qyzt != 2) { return; } string paramInfo = string.Format(@"<patient_info> <patientid>{0}</patientid> <patientname>{1}</patientname> <patientstate>{2}</patientstate> <disportnumber>{3}</disportnumber> </patient_info>", Brkh, callstring, Qyzt, WindowNum); Whzxyybyjh.WebServiceTerminalCall server = new global::ts_call.Whzxyybyjh.WebServiceTerminalCall(); server.CallDrug(paramInfo, Mac); }
public void Call(DmType dmtype, string callstring, double je) { InitCom(); try { string StrMain = ""; if (dmtype == DmType.姓名) { StrMain = callstring + je.ToString(); SendDataChar(StrMain, FontName, xColor, F_Width, F_Height, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); } else if (dmtype == DmType.找零) { StrMain = callstring + Convert.ToString(Math.Abs(je)); SendDataChar(StrMain, FontName, xColor, F_Width, F_Height, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); } else if (dmtype == DmType.实收) { string ss = ""; if (je >= 0) { ss = "实收"; } else { ss = "退款"; } StrMain = ss + ":" + Convert.ToString(Math.Abs(je)); SendDataChar(StrMain, FontName, xColor, F_Width, F_Height, LeftSpa, TopSpa, WordSpa, RowSpa, EnterMode, ExitMode, EnterSpeed, ExitSpeed, StopTime); } else { Call(dmtype, callstring); } } catch (System.Exception err) { throw new Exception(err.Message); } }
//SHL-1语音收费报价器 //浦鑫科技有限公司 /// <summary> /// 显示屏显示 /// </summary> /// <param name="dmtype"></param> /// <param name="callstring"></param> public void Call(DmType dmtype, string callstring) { if (Convertor.IsNumeric(com) == false) { throw new Exception("通讯端口必须设为数字"); } int ncom = Convert.ToInt32(Convertor.IsNull(com, "0")); aa a = new aa(dmtype, callstring); if (dmtype == DmType.应收 || dmtype == DmType.实收) { Thread t = new Thread(new ThreadStart(a.call)); t.Start(); } else { a.call(); } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { try { string ncom = com; if (dmtype == DmType.姓名) { DisFun(ncom, "" + callstring, je); } else if (dmtype == DmType.找零) { DisFun(ncom, "" + callstring, Math.Abs(je)); } else if (dmtype == DmType.实收) { string ss = ""; if (je >= 0) { ss = "实收"; } else { ss = "退款"; } DisFun(ncom, ss, Math.Abs(je)); } else { Call(dmtype, callstring); } } catch (System.Exception err) { throw new Exception(err.Message); } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { string patientName = "发 药 窗 口 "; patientName = patientName + callstring + " " + je.ToString(); string ssql = "select '' "; if (dmtype == DmType.发药呼叫) { try { string ss = "请" + CFMX[0].brxm + "到" + CFMX[0].fyck + "来取药"; SpVoiceClass class2 = new SpVoiceClass(); ISpeechObjectTokens voices = class2.GetVoices("Language = 804", "Gender = Female"); if (voices.Count > 0) { class2.Voice = voices.Item(0); class2.Speak(ss, SpeechVoiceSpeakFlags.SVSFDefault); } } catch (Exception exception) { } } if (dmtype == DmType.发药) { try { Display(patientName, Math.Abs(je)); } catch (Exception exception) { } } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { try { int ncom = Convert.ToInt32(com); if (dmtype == DmType.姓名) { dsbdll(ncom, "$1"); dsbdll(ncom, "#姓名:" + callstring + "#"); } else if (dmtype == DmType.找零) { if (callstring == "退款") { dsbdll(ncom, "$2"); //dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "G"); dsbdll(ncom, "#退您: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); } if (callstring == "补收") { dsbdll(ncom, "$2"); // dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "J"); dsbdll(ncom, "#请您补交: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); } if (callstring == "暂存") { dsbdll(ncom, "$2"); //dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "H"); dsbdll(ncom, "#暂存: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); } if (callstring == "欠费") { dsbdll(ncom, "$2"); // dsbdll(ncom, "-" + Convert.ToString(Math.Abs(je)) + "H"); dsbdll(ncom, "#您欠费: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); } } else if (dmtype == DmType.实收) { string ss = ""; if (je >= 0) { dsbdll(ncom, "$2"); dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "J"); } else { dsbdll(ncom, "$2"); dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "G"); } } else { Call(dmtype, callstring); } } catch (System.Exception err) { throw new Exception(err.Message); } }
public void Call(DmType dmtype, string callstring, double je, CFMX[] CFMX) { if (dmtype == DmType.发药呼叫) { StringBuilder strXml = new StringBuilder(); /* * strXml.Append("<config>"); * strXml.Append("<wicketname>" + strDrugWindow.Trim() + "</wicketname>"); * strXml.Append("<mac>" + strMac.Trim() + "</mac>"); * strXml.Append("<districtname>" + strDistrictName.Trim() + "</districtname>"); * strXml.Append("<patientname>" + callstring.Trim() + "</patientname>"); * strXml.Append("<patientid>" + InitDataBase(CFMX[0].fph) + "</patientid>"); * strXml.Append("</config>"); */ strXml.Append("<patient_info>"); strXml.Append("<call_room>" + strDrugWindow.Trim() + "</call_room>"); strXml.Append("<name>" + callstring.Trim() + "</name>"); strXml.Append("<id>" + InitDataBase(CFMX[0].fph) + "</id>"); strXml.Append("</patient_info>"); // WriteLogToTxt(strXml.ToString()); //MessageBox.Show("mac||" + strMac); if (strMac.Trim().Length > 0 && strDrugWindow.Trim().Length > 0) { try { /* * WebReference.WHCentralhospital ws = new global::ts_call.WebReference.WHCentralhospital(); * //Modify By Tany 2015-11-12 增加读取ini来获取地址 * string url = ApiFunction.GetIniString(TrasenFrame.Classes.Constant.HospitalName, "url", System.Windows.Forms.Application.StartupPath + "\\WhzxyySouthCall.ini"); * //MessageBox.Show("呼叫||" + url); * ws.Url = url; * ws.GetdrugInfo(strXml.ToString()); */ MzCallWs.WebServiceTerminalCall ser = new global::ts_call.MzCallWs.WebServiceTerminalCall(); string url = ApiFunction.GetIniString(TrasenFrame.Classes.Constant.HospitalName, "url", System.Windows.Forms.Application.StartupPath + "\\WhzxyySouthCall.ini"); ser.Url = url;// "http://192.168.0.141:81/WebServiceTerminalCall.asmx"; //string para = string.Format(@"<patient_info><call_room>{0}</call_room><name>{1}</name><id>{2}</id></patient_info>", strDrugWindow.Trim(), callstring.Trim(), InitDataBase(CFMX[0].fph)); string msg = ser.CallDrug(strXml.ToString(), strMac); //MessageBox.Show("ret:" + msg + " par:" + strXml.ToString() + " mac:" + strMac); } catch (Exception err) { throw err; } } } if (dmtype == DmType.发药) { StringBuilder strXml = new StringBuilder(); strXml.Append("<config>"); strXml.Append("<patientid>" + InitDataBase(CFMX[0].fph) + "</patientid>"); strXml.Append("</config>"); if (strMac.Trim().Length > 0 && strDrugWindow.Trim().Length > 0) { try { WebReference.WHCentralhospital ws = new global::ts_call.WebReference.WHCentralhospital(); //Modify By Tany 2015-11-12 增加读取ini来获取地址 string url = ApiFunction.GetIniString(TrasenFrame.Classes.Constant.HospitalName, "url", System.Windows.Forms.Application.StartupPath + "\\WhzxyySouthCall.ini"); //MessageBox.Show("发药||" + url); ws.Url = url; ws.DeletedrugInfo(strXml.ToString()); } catch (Exception err) { throw err; } } //WriteLogToTxt(strXml.ToString()); } }
public void Call(DmType dmtype, string callstring, double je) { throw new NotImplementedException(); }
public void Call(DmType dmtype, string callstring) { ts_Caller.ts_call_AxCL2005_16W caller = new ts_Caller.ts_call_AxCL2005_16W(); //int i = SetTransMode(2, 3);//通讯设置 //i = SetSerialPortPara(1, Convert.ToInt32(com), 115200);//设置串口通讯 //StartSend();//构建节目结构 //i = AddControl(1, 1);//添加屏幕 //i = AddProgram(1, 1, 0);//添加节目 string str = ""; int row = 0; if (callstring == "您好,欢迎光临") { //SendScreenPara(1, 1, 128, 32);//设置屏幕参数 str = "祝您早日康复"; } else if (dmtype == DmType.姓名) { str = "姓名:" + callstring; caller.Call(str);// jianqg 2013-4-11 增加 郴州妇幼需求 必须呼叫姓名 row = 0; xm = str; dehxs = ""; ys = ""; ss = ""; zl = ""; } else if (dmtype == DmType.应收) { str = "应收:" + callstring + "元"; caller.Call(str); row = 1; ys = str; ss = ""; zl = ""; dehxs = str; } else if (dmtype == DmType.实收) { str = "实收:" + callstring + "元"; caller.Call(str); row = 2; ss = str; zl = ""; dehxs = str; } else if (dmtype == DmType.找零) { str = "找零:" + callstring + "元"; caller.Call(str); row = 3; ss = str; //把找零放到找零那里 dehxs = str; } else if (dmtype == DmType.清除) { clearScreen(); } else { str = callstring; } // i = AddLnTxtString(1, 1, 1, 0, 0, 128, 32, str, "宋体", 16, 255, false, false, false, 1, 20, 1);//添加单行文本 Thread.Sleep(int.Parse(ycsj));//程序需要休眠100毫秒 才能 最好的显示到LED屏幕上 // i = SendControl(1, 1, IntPtr.Zero);//发送端口数据 string[] context = new string[] { xm, dehxs }; sendText(context, row); }
public void Call(DmType dmtype, string callstring) { try { int ncom = Convert.ToInt32(com); string[] par = callstring.Split(','); if (dmtype == DmType.姓名) { //dsbdll(1, "&Sc$");//重新刷姓名的时候都清除掉 //2013-8-7修改 原来写死了端口号1 dsbdll(ncom, "&Sc$");//重新刷姓名的时候都清除掉 dsbdll(ncom, "$1"); dsbdll(ncom, "#姓名:" + callstring + "#"); dsbdll(ncom, "&C11姓名:" + callstring + "$");//add by zouchihua 2013-6-24 } if (dmtype == DmType.应收) { if (par.Length == 1) //卡余额小于应收金额 { dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "J"); } else { /*第一行:姓名(科室),第二行:卡余额,第三行:应收, * 第四行:实收,第五行:找零 Modify by zp 2013-10-25 */ dsbdll(ncom, "&Sc$"); //先清除 dsbdll(ncom, "$1"); dsbdll(ncom, "#姓名:" + par[0] + "#"); dsbdll(ncom, "&C11姓名:" + par[0] + par[1] + "$"); //姓名(科室) dsbdll(ncom, "$2"); dsbdll(ncom, "&C21卡余额:" + par[2] + "$"); //卡余额 "&C21" + callstring + "$" //dsbdll(ncom, "EE"); //dsbdll(ncom, "" + par[2] + "P"); //"&C21本院竭诚为您服务$ //dsbdll(ncom, "&C11" + par[0].ToString() + "$"); //姓名 //dsbdll(ncom, "&C21" + par[1].ToString() + "$"); //总费用 //dsbdll(ncom, "$C3"); //dsbdll(ncom, "&C31卡余额支付:" + par[3] + "$");//卡余额支付 //dsbdll(ncom, "EF"); //dsbdll(ncom, "" + par[3] + "P"); dsbdll(ncom, "$C3"); dsbdll(ncom, "&C31应收现金:" + par[3] + "$");//应收 dsbdll(ncom, "D1"); dsbdll(ncom, "" + par[3].Substring(0, par[3].Length - 1) + "P"); } } if (dmtype == DmType.实收) { if (par.Length == 1) //卡余额小于应收金额 { dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "Y"); } else { dsbdll(ncom, "$5"); // dsbdll(ncom, "" + par[4] + "Y"); dsbdll(ncom, "&C41实收现金:" + par[4] + "$"); dsbdll(ncom, "D2"); dsbdll(ncom, "" + par[4].Substring(0, par[4].Length - 1) + "P"); } } if (dmtype == DmType.找零) { //if (par.Length == 1) //卡余额小于应收金额 //{ dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "Z"); //} //else //{ // dsbdll(ncom, "$5"); // dsbdll(ncom, "&C51找零:" + par[5] + "$"); //} } if (dmtype == DmType.欢迎) { if (kind == 4) { dsbdll(ncom, "&Sc$"); //清屏 先处理清屏 if (callstring == null || callstring == "") { callstring = "本院竭诚为您服务"; } dsbdll(ncom, "&C21" + callstring + "$"); } else { if (callstring == "抱歉,暂停工作") { dsbdll(ncom, "W"); } else { dsbdll(ncom, "F"); } } } if (dmtype == DmType.清除) { dsbdll(ncom, "F"); //add by zouchihua 2013-6-24 dsbdll(ncom, "&Sc$"); //清屏 } if (dmtype == DmType.卡充值) { dsbdll(ncom, "$2"); dsbdll(ncom, "" + callstring + "" + "Y"); //收您:XXXX元. //dsbdll(ncom, callstring + "P"); //播报 XXX元 //dsbdll(ncom, "&C21卡充值:" + callstring+"元$"); } } catch (System.Exception err) { throw new Exception(err.Message); } }
/// <summary> /// 报价显示 Modify By zp 2013-09-16 /// </summary> /// <param name="dmtype">枚举类型</param> /// <param name="callstring">显示字符串</param> /// <param name="je">金额</param> public void Call(DmType dmtype, string callstring, double je) { try { int ncom = Convert.ToInt32(com); if (dmtype == DmType.姓名) { dsbdll(ncom, "$1"); dsbdll(ncom, "#姓名:" + callstring + "#"); } else if (dmtype == DmType.找零) { #region 注释 2013-09-16 //if (callstring == "退款") //{ // dsbdll(ncom, "$2"); // //dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "G"); // dsbdll(ncom, "#退您: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); //} //if (callstring == "补收") //{ // dsbdll(ncom, "$2"); // // dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "J"); // dsbdll(ncom, "#请您补交: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); //} //if (callstring == "暂存") //{ // dsbdll(ncom, "$2"); // //dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "H"); // dsbdll(ncom, "#暂存: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); //} //if (callstring == "欠费") //{ // dsbdll(ncom, "$2"); // // dsbdll(ncom, "-" + Convert.ToString(Math.Abs(je)) + "H"); // dsbdll(ncom, "#您欠费: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); //} //if (callstring == "预交") //Modify By zp 2013-09-16 //{ // dsbdll(ncom, "$2"); // dsbdll(ncom, "#您预收: " + Convert.ToDecimal(Math.Abs(je)).ToString("0.00") + " 元#"); //} #endregion string[] par = callstring.Split('|'); //dsbdll(ncom, "$2"); //for (int i = 0; i < par.Length; i++) //{ // dsbdll(ncom, String.Format("{0}J", par[i])); //} //Modify By Kevin 2013-09-17 //Modify By Kevin 2013-10-25 //Begin string isVoice = ""; isVoice = "P"; if (par.Length <= 1) { dsbdll(ncom, "&Sc$"); string[] p0 = par[0].ToString().Split(':'); string calling = "E7"; if (p0[0].ToString() == "退款") { calling = "ED"; } dsbdll(ncom, "&C11" + par[0].ToString() + "$"); dsbdll(ncom, calling); dsbdll(ncom, par[0].Substring(3) + isVoice); } else { dsbdll(ncom, "&Sc$"); dsbdll(ncom, "&C11" + par[0].ToString() + "$"); //姓名 dsbdll(ncom, "&C21" + par[1].ToString() + "$"); //总费用 dsbdll(ncom, "E1"); dsbdll(ncom, par[1].Substring(4) + isVoice); dsbdll(ncom, "&C31" + par[2].ToString() + "$"); //总预交 dsbdll(ncom, "E5"); dsbdll(ncom, par[2].Substring(4) + isVoice); dsbdll(ncom, "&C41" + par[3].ToString() + "$"); //医保 dsbdll(ncom, "EB"); dsbdll(ncom, par[3].Substring(5) + isVoice); //退款,补交 string[] p4 = par[4].ToString().Split(':'); string calling = "E7"; if (p4[0].ToString() == "退款") { calling = "ED"; } dsbdll(ncom, "&C51" + par[4].ToString() + "$"); dsbdll(ncom, calling); dsbdll(ncom, par[4].Substring(3) + isVoice); } dsbdll(ncom, "D5"); //End } else if (dmtype == DmType.实收) { string ss = ""; if (je >= 0) { dsbdll(ncom, "$2"); dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "J"); } else { dsbdll(ncom, "$2"); dsbdll(ncom, "" + Convert.ToString(Math.Abs(je)) + "G"); } } else { Call(dmtype, callstring); } } catch (System.Exception err) { throw new Exception(err.Message); } }
//包含参数的构造函数 public aa(DmType dmtype, string callstring) { dmtype1 = dmtype; callstring1 = callstring; }
public void Call(DmType dmtype, string callstring, double je) { //throw new Exception("The method or operation is not implemented."); }