public List<WindowOR> selectWindowData(string orgbhWhere) { if (string.IsNullOrEmpty(orgbhWhere)) return null; string sql = @"select bu.* from t_Window bu inner join t_Bank b on b.orgbh= bu.orgbh where " + orgbhWhere; DataTable dt = null; try { dt = dbMsSql.ExecuteQuery(sql); } catch (Exception ex) { throw ex; } if (dt == null) return null; List<WindowOR> listWind = new List<WindowOR>(); foreach (DataRow dr in dt.Rows) { WindowOR obj = new WindowOR(dr); listWind.Add(obj); } return listWind; }
/// <summary> /// 获取插入数据 /// </summary> public string GetInsertSql(WindowOR window) { string sql = @"insert into t_Window (Id,Name,SoundDev,Description,OrgBH, Role,JCA2,JCA3,JCA4,JCA5,JCA6,JCA7) values ('@Id','@Name',SoundDev,'@Description','@OrgBH', '@Role','@JCA2','@JCA3','@JCA4','@JCA5','@JCA6','@JCA7')"; sql = sql.Replace("@Id", window.Id); // sql = sql.Replace("@Name", window.Name); //窗口名称 sql = sql.Replace("@SoundDev", window.Sounddev.ToString()); //声音设备 sql = sql.Replace("@Description", window.Description); //描述 sql = sql.Replace("@OrgBH", window.Orgbh); //机构 sql = sql.Replace("@Role", window.Role); //周一柜台角色 sql = sql.Replace("@JCA2", window.Jca2); //周二柜台角色 sql = sql.Replace("@JCA3", window.Jca3); //周三柜台角色 sql = sql.Replace("@JCA4", window.Jca4); //周四柜台角色 sql = sql.Replace("@JCA5", window.Jca5); //周五柜台角色 sql = sql.Replace("@JCA6", window.Jca6); //周六柜台角色 sql = sql.Replace("@JCA7", window.Jca7); //周日柜台角色 return sql; }
public List<BussinessRoleONOR> GetBussinessRoleOn(EmployeeOR empobj, WindowOR winobj) { string strRoleID = string.Empty; switch (DateTime.Now.DayOfWeek) { case DayOfWeek.Monday: strRoleID = winobj.Role; break; case DayOfWeek.Tuesday: strRoleID = winobj.Jca2; break; case DayOfWeek.Wednesday: strRoleID = winobj.Jca3; break; case DayOfWeek.Thursday: strRoleID = winobj.Jca4; break; case DayOfWeek.Friday: strRoleID = winobj.Jca5; break; case DayOfWeek.Saturday: strRoleID = winobj.Jca6; break; case DayOfWeek.Sunday: strRoleID = winobj.Jca7; break; } BussinessRoleOnBussOR windowRole = null; if (!string.IsNullOrEmpty(strRoleID)) { windowRole = GetBussinessRole(strRoleID); } BussinessRoleOnBussOR empRole = null; if (!string.IsNullOrEmpty(empobj.Highrole)) { empRole = GetBussinessRole(empobj.Highrole); } return CombinRole(windowRole, empRole); }
public void TpShowSuspendedRestore(int mType, string Address, WindowOR _windOR) { try { string result = GetHDClient().ShowScreenMSG(1, mType//显示类型。1(显示客户号|未受理客户数|客户名字),2(显示登录是否成功),3(显示登出是否成功),4(显示暂停服务),5(显示恢复服务),6(显示自定义信息 , Address , _windOR.ColNumber.Value * 16 , 16 * 1 , "" , "" , ""); if (result == "") { } ErrorLog.WriteLog("TpShowSuspendedRestore#OK", result); } catch (Exception ex) { ErrorLog.WriteLog("TpShowSuspendedRestore#ex", ex.Message); } }
/// <summary> /// 调用条屏,自定义显示信息 /// </summary> /// <param name="devAddr"></param> /// <param name="content"></param> /// <param name="Bill"></param> /// <param name="Windowno"></param> /// <returns></returns> public string ShowTpMsgSelf(string devAddr, string content, WindowOR _windOR) { try { string strResultZ= GetHDClient().ShowScreenMSG(1//屏幕类型。1(窗口屏),2(综合屏) , 2//显示类型。1(显示客户号|窗口号),2(显示自定义信息),3(窗口屏专属,显示暂停服务),4(窗口屏专属,显示服务恢复) , devAddr , _windOR.ColNumber.Value * 16 , 16 * 1 , "" , "" , content); ErrorLog.WriteLog("ShowTpMsgSelf_ZP#OK:", string.Format("主屏_显示:地址:{0}, 结果:{1}", devAddr, strResultZ)); return strResultZ; } catch (Exception ex) { ErrorLog.WriteLog("ShowTpMsgSelf#ex", ex.Message); return ""; } }
/// <summary> /// 条屏显示信息 /// </summary> public string ShowTpMsg(string devAddr, string content, string Bill, string Windowno, WindowOR _windOR) { try { //显示主屏信息 try { if (ListZP != null && ListZP.Count > 0) { foreach (DeviceOR obj in ListZP) { if (!string.IsNullOrEmpty(obj.Address)) { string strResultZ = GetHDClient().ShowScreenMSG(2//屏幕类型。1(窗口屏),2(综合屏) , 1//显示类型。1(显示客户号|窗口号),2(显示自定义信息),3(窗口屏专属,显示暂停服务),4(窗口屏专属,显示服务恢复) , obj.Address , 16 * obj.ColNumber.Value , 16 * obj.RowNumber.Value , Bill , Windowno , ""); ErrorLog.WriteLog("ShowTpMsg_test", string.Format("ColNumber*16={0},row*16={1},bill:{2}", 16 * obj.ColNumber.Value , 16 * obj.RowNumber.Value , Bill)); ErrorLog.WriteLog("ShowTpMsg#ShowScreenMSG_ZP#OK:", string.Format("主屏_显示:地址:{0} 结果:{1}", obj.Address, strResultZ)); } } } } catch (Exception ex) { ErrorLog.WriteLog("ShowScreenMSG#ZP:", ex.Message); } string strResult= GetHDClient().ShowScreenMSG(1//屏幕类型。1(窗口屏),2(综合屏) , 1//显示类型。1(显示客户号|窗口号),2(显示自定义信息),3(窗口屏专属,显示暂停服务),4(窗口屏专属,显示服务恢复) , devAddr , _windOR.ColNumber.Value * 16 , 16 * 1 , Bill , Windowno , content); ErrorLog.WriteLog("ShowScreenMSG_TP_OK:", string.Format("窗口屏显示:地址:{0} 结果:{1}",devAddr,strResult)); return strResult; } catch (Exception ex) { ErrorLog.WriteLog("ShowTpMsg#ex", ex.Message); return ""; } }