/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void WLoadGrid(int page, int rows, string agentId, string siteId, string period, string awardResult, string clientQuery, string clientQueryText, string startDate, string endDate) { string strSQL = @"select t.orderid, t.agentid, t.siteid, t.terminalid, t.clientid, t.clientname, t.cardid,g.gamename gameid, l.lotterytypename lotterytype,t.period, t.userBetCodes,t.centerBetCodes, t.multiple, t.betfee, t.bettime, t.ischase, t.chaseorderid, t.orderstatus, t.ordertime, t.awardresult, t.awardmoney, t.awardtime, t.settlestatus, t.settletime, t.createtime from ttlotteryorder t,tbgame g,tblottery l where t.gameid=g.gameid and t.lotterytype=l.lotterytype and t.orderStatus=" + (int)OrderStatus.Ticket + "" + " and t.awardResult in (" + ((int)AwardResult.SmallAward).ToString() + "," + ((int)AwardResult.BigAward).ToString() + ")"; if (!string.IsNullOrEmpty(agentId)) { strSQL += " and t.agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(siteId)) { strSQL += " and t.siteId='" + siteId + "'"; } if (!string.IsNullOrEmpty(period)) { strSQL += " and t.period='" + period + "'"; } if (!string.IsNullOrEmpty(awardResult)) { strSQL += " and t.awardResult='" + awardResult + "'"; } if (!string.IsNullOrEmpty(clientQueryText) && !string.IsNullOrEmpty(clientQuery)) { if (clientQuery == ((int)ClientQuery.CardId).ToString()) { strSQL += " and t.cardId='" + clientQueryText + "'"; } if (clientQuery == ((int)ClientQuery.ClientId).ToString()) { strSQL += " and t.clientId='" + clientQueryText + "'"; } if (clientQuery == ((int)ClientQuery.ClientName).ToString()) { strSQL += " and t.clientName='" + clientQueryText + "'"; } if (clientQuery == ((int)ClientQuery.ClinetPhone).ToString()) { strSQL += " and bc.telephone='" + clientQueryText + "'"; } } if (!string.IsNullOrEmpty(startDate)) { strSQL += " and t.awardTime>= '" + startDate + " 00:00:00'"; } if (!string.IsNullOrEmpty(endDate)) { strSQL += " and t.awardTime<='" + endDate + " 23:59:59'"; } strSQL += " order by t.betTime desc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGrid(int page, int rows, string agentId, string agentName, string payStatus, string startDate, string endDate) { string strSQL = @"select flowid, agentid, agentname, startdate, enddate, salefee, rebate, commissionfee, paystatus, modeid, settlementtime, settlementid, settlementname, cashierid, cashiername, case when payStatus='0' then '' else to_char(paytime,'yyyy-mm-dd hh24:mi:ss') end paytime from TTAGENTSETTLEMENT t where 1=1"; if (!string.IsNullOrEmpty(agentId)) { strSQL += " and agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(agentName)) { strSQL += " and agentName like '%" + agentName + "%'"; } if (!string.IsNullOrEmpty(payStatus)) { strSQL += " and payStatus='" + payStatus + "'"; } if (!string.IsNullOrEmpty(startDate)) { strSQL += " and settlementTime>=to_date('" + startDate + " 00:00:00','yyyy-MM-dd hh24:mi:ss')"; } if (!string.IsNullOrEmpty(endDate)) { strSQL += " and settlementTime<=to_date('" + endDate + " 23:59:59','yyyy-MM-dd hh24:mi:ss')"; } strSQL += " order by settlementTime desc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载中奖数据报表数据 /// </summary> /// <param name="page"></param> /// <param name="rows"></param> /// <param name="startDate"></param> /// <param name="endDate"></param> public void WinPrizeDataLoadGrid(int page, int rows, string startDate, string endDate, string city, string county, string siteId, string terminalId, string lotteryType, string gameId) { string strSQL = WinPrizeDataReportSql(startDate, endDate, city, county, siteId, terminalId, lotteryType, gameId); string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGridOnLine(int page, int rows, string agentId, string siteId, string terminalId, string onlineStatus, int offlineMinutes, string startDate, string endDate) { string strSQL = @"select * from (select s.sitename,a.agentname,case when ceil(((sysdate - checktime)) * 24 * 60)>" + offlineMinutes + @" then 1 else 0 end as onlinestatus,c.* from TBTerminal c left join tbsite s on c.siteid=s.siteid left join tbagent a on c.agentid=a.agentid) t where 1=1"; if (!string.IsNullOrEmpty(terminalId)) { strSQL += " and t.terminalId='" + terminalId + "'"; } if (!string.IsNullOrEmpty(onlineStatus)) { strSQL += " and t.onlineStatus='" + onlineStatus + "'"; } if (!string.IsNullOrEmpty(startDate)) { strSQL += " and t.checkTime>=to_date('" + startDate + " 00:00:00','yyyy-MM-dd hh24:mi:ss')"; } if (!string.IsNullOrEmpty(endDate)) { strSQL += " and t.checkTime<=to_date('" + endDate + " 23:59:59','yyyy-MM-dd hh24:mi:ss')"; } if (!string.IsNullOrEmpty(agentId)) { strSQL += " and t.agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(siteId)) { strSQL += " and t.siteId='" + siteId + "'"; } strSQL += " order by t.terminalId desc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGrid(int page, int rows, string agentId, string agentName, string startDate, string endDate) { string strSQL = "select a.*,p.modename from TTAgentTakeCash a,TBPayMode p where a.handlemode=p.modeid "; if (!string.IsNullOrEmpty(agentId)) { strSQL += " and a.agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(agentName)) { strSQL += " and a.agentName like '%" + agentName + "%'"; } if (!string.IsNullOrEmpty(startDate)) { strSQL += " and a.createTime >= To_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss')"; } if (!string.IsNullOrEmpty(endDate)) { strSQL += " and a.createTime <= To_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')"; } strSQL += " order by agentId,createTime desc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
public void Load(string caseId) { chufashu01 chufa = null; Param param = new Param(); string strSQL = " select top 1 * from TB_Chufajuedingshu31 where CaseId=@caseId "; param.Add("@caseId", caseId); try { db.Open(); ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param); if (dr.Read()) { chufa = ReadData(dr); } WebJson.ToJson(context, chufa); } catch (Exception) { throw; } finally { db.Close(); } // string str = db.DataGridTemp(strSQL, param); }
public void LoadTree(string caseId) { //DataSet ds = tbCaseDAO.GetDataSet("select * from TSModule", null); var caseTypes = new TBCaseDAO().GetCaseTypeIdHash(caseId); List <Tree <TBEnforcementType> > list = new List <Tree <TBEnforcementType> >(); //List<Tree<TSModule>> list = new List<Tree<TSModule>>(1); //Tree<TSModule> treeNode = new Tree<TSModule>(); //treeNode.text = "系统平台模块";//节点名称 //TSModule tsModule = new TSModule(); //tsModule.moduleId = "0";//模块编号 //tsModule.moduleCode = "";//模块代码 //tsModule.moduleName = "";//模块名称 //tsModule.moduleURL = "";//模块URL //tsModule.imgClass = "";//模块图片样式 //tsModule.parentId = "";//父模块编号("0"代表无父模块) //tsModule.moduleLayer = 0;//模块所属层次 //tsModule.moduleIndex = 0;//模块索引 //treeNode.attributes = tsModule; //AddNode(treeNode, ds, roleRight);//遍历子模块 //list.Add(treeNode); foreach (var item in caseTypes) { var caseType = new Tree <TBEnforcementType>() { attributes = new TBEnforcementType() { EnforcementTypeId = item.EnforcementTypeId }, text = item.EnforcementTypeName }; list.Add(caseType); } WebJson.ToJson(context, list); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGrid(int page, int rows) { string strSQL = "select * from TBGame"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载客户提现报表数据 /// </summary> /// <param name="page"></param> /// <param name="rows"></param> /// <param name="startDate"></param> /// <param name="endDate"></param> public void ClientTakeCashLoadGrid(int page, int rows, string startDate, string endDate, string agentId, string clientId) { string strSQL = ClientTakeCashReportSql(startDate, endDate, agentId, clientId); string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// </summary> /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> public void LoadGrid(int page, int rows, string agentId, string auditStatus, string startDate, string endDate) { string strSQL = "select * from TTAgentPreRechg where 1=1 "; if (!string.IsNullOrEmpty(agentId)) { strSQL += " and agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(auditStatus)) { strSQL += " and auditStatus='" + auditStatus + "'"; } if (!string.IsNullOrEmpty(startDate)) { strSQL += " and createtime>=to_date('" + startDate + " 00:00:00','yyyy-MM-dd hh24:mi:ss')"; } if (!string.IsNullOrEmpty(endDate)) { strSQL += " and createtime<=to_date('" + endDate + " 23:59:59','yyyy-MM-dd hh24:mi:ss')"; } strSQL += " order by auditStatus asc, createtime desc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 推荐人佣金 /// </summary> /// <param name="startDate">起始日期</param> /// <param name="endDate">结束日期</param> /// <param name="clientQuery">0 客户编号 1 客户卡号</param> /// <param name="clientId">条件</param> public void RefererCommiss(string startDate, string endDate, string clientId) { string str = ""; if (string.IsNullOrEmpty(clientId)) { Message.success(context, "客户卡号或客户编号不能为空!"); } else { string strSQL = @" select tc.clientid, tc.cardId,tc.clientName,b.salefee,b.commissfee,b.startdate,b.endDate,tc.refererrebate,substr(tc.referervaliddate,1,10) referervaliddate " + " from (select l.clientid, sum(l.betfee) salefee, sum(l.betfee*(c.refererrebate/100)) commissfee,'" + startDate + "' startDate,'" + endDate + "' endDate from TTLOTTERYORDER l " + " inner join (select t.clientid,t.refererrebate,t.referervaliddate from TBClient t where t.refererclientid='" + clientId + "') c " + " on l.clientid=c.clientid " + " where l.bettime>='" + startDate + " 00:00:00' " + " and l.bettime<='" + endDate + " 23:59:59' " + " and l.orderstatus='" + (int)OrderStatus.Ticket + "'" + " and l.bettime<=c.referervaliddate " + " group by l.clientid) b " + " left join TBClient tc on b.clientId=tc.clientId " + " order by tc.createtime desc"; str = commonDao.DataGrid(strSQL, null); WebJson.Write(context, str); } }
public void SetGeneralConfigValues(General cfgGeneral) { var cfg = new ConfigValues(cfgGeneral); CheckSession(); WebJson.JsonCommand <string>(URL + "set_configuration.fcgi?session=" + Session, cfg, null, TimeOut); }
/// <summary> /// 加载指定系统用户 /// <param name="userId">用户编号</param> /// </summary> public void Load(string userId) { try { TSUser tsUser = tsUserDAO.Get(userId); tsUser.status = "1".Equals(tsUser.status) ? "on" : "off"; tsUser.roleIds = "'" + tsUser.roleIds.Replace(",", "','") + "'"; List <TSRole> listRole = new TSRoleDAO().GetList("select * from TSRole where status='1' and roleId in (" + tsUser.roleIds + ")", new Param()); tsUser.roleIds = ""; foreach (TSRole tsRole in listRole) { if (string.IsNullOrWhiteSpace(tsUser.roleIds)) { tsUser.roleIds = tsRole.roleId; } else { tsUser.roleIds += "," + tsRole.roleId; } } WebJson.ToJson(context, tsUser); } catch (Exception e) { Message.error(context, e.Message); } }
public void OnlyLoadCaseCarNoAndStationName(string caseId) { Cgs_AskNote12 chufa = null; Param param = new Param(); string strSQL = " select top 1 * from TBCase where CaseId=@caseId "; param.Add("@caseId", caseId); try { db.Open(); ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param); if (dr.Read()) { chufa = ReadDataOnlyCaseCarNoAndStationName(dr); } WebJson.ToJson(context, chufa); } catch (Exception) { throw; } finally { db.Close(); } // string str = db.DataGridTemp(strSQL, param); }
/// <summary> /// 加载主界面信息【部门名称、用户名称、菜单】 /// </summary> /// <param name="context"></param> /// <param name="loginUser">登录用户信息</param> public void LoadMain() { SysMain main = new SysMain(); DataView dv = new DataView(); Hashtable moduleRight = new Hashtable(); //获取所有模块,后面加 where moduleurl is not null 是为看只获取权限页面 DataSet ds = tsModuleDAO.GetDataSet("select * from TSModule where moduleurl is not null and isEnable=1", null); //获取用户拥有的模块 Hashtable roleRight = new TSRightDAO().GetModuleIdHash(loginUser.RoleIds); //获取一级模块列表 dv.Table = ds.Tables[0]; dv.RowFilter = "parentId='0'"; dv.Sort = "moduleIndex desc"; for (int i = 0; i < dv.Count; i++) { MenuItem item = new MenuItem(); item.id = dv[i]["moduleId"].ToString(); item.title = dv[i]["moduleName"].ToString(); item.icon = dv[i]["imgClass"].ToString(); item.url = dv[i]["moduleURL"].ToString(); if (GetSubMenu(dv[i]["moduleId"].ToString(), item, ds, roleRight, moduleRight)) { main.sysMenu.Add(item); moduleRight.Add(dv[i]["moduleCode"].ToString(), dv[i]["moduleName"].ToString()); } } main.deptName = loginUser.DeptName; main.userName = loginUser.UserName; loginUser.SetRight(context, moduleRight); WebJson.ToJson(context, main); loginUser.Log("登录系统"); }
public void AcionaRele_Json() { LoginRequest acesso = new LoginRequest(); acesso.login = Login; acesso.password = Password; object result1 = WebJson.JsonCommand <LoginResult>(URL + "login.fcgi", acesso); if (result1 is LoginResult) { LoginResult dados = (LoginResult)result1; Console.WriteLine("Sessão: " + dados.session); if (dados.session != null) { ActionsRequest ar = new ActionsRequest(); ar.actions = new ActionItem[] { new ActionItem() { action = "door", parameters = "door=1" } }; // Não retorna saida WebJson.JsonCommand <string>(URL + "execute_actions.fcgi?session=" + dados.session, ar); } else { Assert.Inconclusive("Login invalido"); } } else { Assert.Fail((string)result1); } }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGrid(int page, int rows) { string strSQL = "select TOP (100) PERCENT * from TSRole order by roleId asc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// <param name="agentName">代理商名称</param> /// <param name="agentId">代理商编号</param> /// <param name="bankCardId">银行卡号</param> /// <param name="auditStatus">审核状态</param> /// </summary> public void LoadGrid(int page, int rows, string agentName, string agentId, string bankCardId, string auditStatus) { string strSQL = "select a.*,b.areaName from TBAgent a,TBArea b where a.areaId=b.areaId "; if (!string.IsNullOrEmpty(agentName)) { strSQL += " and a.agentName like '%" + agentName + "%'"; } if (!string.IsNullOrEmpty(auditStatus)) { strSQL += " and a.auditStatus in(" + auditStatus + ")"; } if (!string.IsNullOrEmpty(agentId)) { strSQL += " and a.agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(bankCardId)) { strSQL += " and a.bankCardId='" + bankCardId + "'"; } strSQL += " order by a.agentId "; Param param = new Param(); param.Clear(); string str = commonDao.DataGrid(strSQL, param, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGrid(int page, int rows, string cardId, string status, string supplierCode, string supplierBatch, string agentId, string siteId) { string strSQL = "select s.sitename,a.agentname,c.* from TBCard c left join tbsite s on c.siteid=s.siteid left join tbagent a on c.agentid=a.agentid where 1=1 "; if (!string.IsNullOrEmpty(cardId)) { strSQL += " and c.cardId='" + cardId + "'"; } if (!string.IsNullOrEmpty(status)) { strSQL += " and c.status='" + status + "'"; } if (!string.IsNullOrEmpty(supplierCode)) { strSQL += " and c.supplierCode='" + supplierCode + "'"; } if (!string.IsNullOrEmpty(supplierBatch)) { strSQL += " and c.supplierBatch='" + supplierBatch + "'"; } if (!string.IsNullOrEmpty(agentId)) { strSQL += " and c.agentId='" + agentId + "'"; } if (!string.IsNullOrEmpty(siteId)) { strSQL += " and c.siteId='" + siteId + "'"; } strSQL += " order by c.cardId"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> /// </summary> public void LoadGrid(int page, int rows, string uKeyId, string status, string siteName, string agentName, string agentId) { string strSQL = "select s.sitename,a.agentname,c.* from TBUKey c left join tbsite s on c.siteid=s.siteid left join tbagent a on c.agentid=a.agentid where 1=1"; if (!string.IsNullOrEmpty(uKeyId)) { strSQL += " and c.uKeyId='" + uKeyId + "'"; } if (!string.IsNullOrEmpty(status)) { strSQL += " and c.status='" + status + "'"; } if (!string.IsNullOrEmpty(agentId)) { strSQL += " and c.agentId ='" + agentId + "'"; } if (!string.IsNullOrEmpty(siteName)) { strSQL += " and s.siteName like '%" + siteName + "%'"; } if (!string.IsNullOrEmpty(agentName)) { strSQL += " and a.agentName like '%" + agentName + "%'"; } string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
/// <summary> /// 加载DataGrid /// </summary> /// <param name="page">查询页数</param> /// <param name="rows">每页记录数</param> public void LoadGrid(int page, int rows, string period, string gameId, string startDate, string endDate) { string strSQL = @"select * from (select t.flowid,t.gameid,g.gamename,t.period,t.starttime,t.endtime,t.publishtime,t.numbers from TBPNUMNOTICE t left join TBGame g on t.gameid=g.gameid ) tt where 1=1 "; if (!string.IsNullOrEmpty(period)) { strSQL += " and tt.period='" + period + "'"; } if (!string.IsNullOrEmpty(gameId)) { strSQL += " and tt.gameId='" + gameId + "'"; } if (!string.IsNullOrEmpty(startDate)) { strSQL += " and tt.publishTime>= '" + startDate + " 00:00:00'"; } if (!string.IsNullOrEmpty(endDate)) { strSQL += " and tt.publishTime<= '" + endDate + " 23:59:59'"; } strSQL += " order by tt.period desc"; string str = commonDao.DataGrid(strSQL, null, page, rows); WebJson.Write(context, str); }
public void Connect(string cIP_DNS_URL = null, string cLogin = null, string cPassword = null, bool?useSSL = null, int?nPort = null) { URL = cIP_DNS_URL ?? URL; Login = cLogin ?? Login; Password = cPassword ?? Password; SSL = useSSL ?? SSL; Port = nPort ?? Port; // Sem dados não fa nada! if (URL == null || Login == null || Password == null) { throw new cidException(ErroCodes.LoginRequestFields, "Invalid Request Start"); } // Limpa qualquer espaço desnecessário (evita erros de colagem) URL = URL.Trim().ToLower(); // Foi passado o IP/DNS em vez da URL, então converte para a URL direto if (!URL.StartsWith("http") && !URL.Contains("://")) { if (SSL) { URL = "https://" + URL + (Port == 443 ? "" : (":" + Port)); } else { URL = "http://" + URL + (Port == 80 ? "" : (":" + Port)); } } // Deve ser sempre terminado por '/' pois os comandos serão concatenados diretamente if (!URL.EndsWith("/")) { URL += "/"; } LoginRequest lreq = new LoginRequest(); lreq.login = Login; lreq.password = Password; var result = WebJson.JsonCommand <LoginResult>(URL + "login.fcgi", lreq, null, TimeOut); if (result is LoginResult) { LoginResult dados = (LoginResult)result; if (dados.session == null) { throw new cidException(ErroCodes.LoginRequestFields, "Invalid User/Password"); } dtConnection = dtLastCommand = DateTime.Now; Session = dados.session; } else { throw new cidException(ErroCodes.LoginInvalid, result.error ?? "Erro de conexão"); } }
// TODO: unificar na configuração geral public void SetLeds(LedsColors leds) { ConfigValues cfg = new ConfigValues(leds); CheckSession(); WebJson.JsonCommand <string>(URL + "set_configuration.fcgi?session=" + Session, cfg, null, TimeOut); WebJson.JsonCommand <string>(URL + "led_rgb_refresh.fcgi?session=" + Session, null, null, TimeOut); }
public StatusResult ChangeDeviceLanguage(string language) { var cfg = new ConfigValues(true); cfg.general.language = language; CheckSession(); return(WebJson.JsonCommand <StatusResult>(URL + "set_configuration.fcgi?session=" + Session, cfg, null, TimeOut)); }
/// <summary> /// Configura o Beep /// </summary> public void SetBeep(bool lEnable) { var cfg = new ConfigValues(true); cfg.general.beep_enabled = lEnable ? "1" : "0"; CheckSession(); WebJson.JsonCommand <string>(URL + "set_configuration.fcgi?session=" + Session, cfg, null, TimeOut); }
/// <summary> /// Configura o uso da campainha em um RELÊ específico /// </summary> public void SetBell(int nRele) { var cfg = new ConfigValues(true); cfg.general.beep_enabled = nRele == 0 ? "0":"1"; cfg.general.bell_relay = nRele.ToString(); CheckSession(); WebJson.JsonCommand <string>(URL + "set_configuration.fcgi?session=" + Session, cfg, null, TimeOut); }
public void TakeCash(string flowid, string withdrawperson) { Param Param = new Param(); Param.Add(":flowid", flowid); string sqlStr = string.Format("update TTClientAccDetail set withDrawState=1,withdrawtime=sysdate,withdrawperson='{0}' where flowid=@flowid", withdrawperson); WebJson.Write(context, ttClientTakeCashDAO.TakeCash(sqlStr, Param).ToString()); }
public GpioState GetGpio(int gpio) { GpioObject o = new GpioObject(); o.gpio = gpio; CheckSession(); return(WebJson.JsonCommand <GpioState>(URL + "gpio_state.fcgi?session=" + Session, o, null, TimeOut)); }
/// <summary> /// 获取代理商终端维护状态 /// </summary> public void AgentTerminalStatusCombobox() { DataTable dt = EnumSelectListHelper.CreatSelectListByEnum(typeof(TerminalStatus)); DataView dv = new DataView(dt); dv.RowFilter = "value not in (" + ((int)TerminalStatus.InStore).ToString() + ")"; DataTable dt_New = dv.ToTable(); WebJson.Write(context, commonDao.Combobox(dt_New)); }
/// <summary> /// Comando para setar uma nova senha master para o dispositivo /// </summary> /// <param name="password">Nova senha a ser definida no dispositivo</param> /// <returns></returns> public StatusResult SetMasterPassword(string password) { CheckSession(); var obj = new MasterPassword() { password = password }; return(WebJson.JsonCommand <StatusResult>(URL + "master_password.fcgi?session=" + Session, obj, null, TimeOut)); }