//获取帐户短信可用数量 public static int GetBalance() { int Id = 300;//机构代码 try { Id = Convert.ToInt32(ApiClientUtil.GetConfigCont("MESSAGE_ID")); } catch { } string Name = ApiClientUtil.GetConfigCont("MESSAGE_NAME"); //账户名 string Psw = ApiClientUtil.GetConfigCont("MESSAGE_PWD"); //密码 string webServiceURL = ApiClientUtil.GetConfigCont("MESSAGE_WEBSERVICEURL"); //webService地址 //GetBalance(int Id, string Name, string Psw) int Balance = -1; object BalanceState = null; try { BalanceState = DynamicServiceBind.InvokeWebService(webServiceURL, "GetBalance", new object[] { Id, Name, Psw }); } catch (Exception e) { throw e; } if (BalanceState != null) { System.Reflection.FieldInfo fieldInfoBalance = BalanceState.GetType().GetField("Balance"); Balance = (int)fieldInfoBalance.GetValue(BalanceState); } return(Balance); }
//定时发送短信 public static object SendMessageTimer(string sendDoc, string getTel, string sendDatetime) { int Id = 300;//机构代码 try { Id = Convert.ToInt32(ApiClientUtil.GetConfigCont("MESSAGE_ID")); } catch { } string Name = ApiClientUtil.GetConfigCont("MESSAGE_NAME"); //账户名 string Psw = ApiClientUtil.GetConfigCont("MESSAGE_PWD"); //密码 string webServiceURL = ApiClientUtil.GetConfigCont("MESSAGE_WEBSERVICEURL"); //webService地址 long Timestamp = GetTimeStamp(); //SendTimer(int Id, string Name, string Psw, string Message, string Phone,String DateTime, long Timestamp) object result = ""; try { result = DynamicServiceBind.InvokeWebService(webServiceURL, "SendTimer", new object[] { Id, Name, Psw, sendDoc, getTel, sendDatetime, Timestamp }); } catch (Exception e) { } return(result); }
//发送短信 public static object SendMessage(string sendDoc, string getTel) { int Id = 300;//机构代码 try { Id = Convert.ToInt32(ApiClientUtil.GetConfigCont("MESSAGE_ID")); } catch { } string Name = ApiClientUtil.GetConfigCont("MESSAGE_NAME"); //账户名 string Psw = ApiClientUtil.GetConfigCont("MESSAGE_PWD"); //密码 string webServiceURL = ApiClientUtil.GetConfigCont("MESSAGE_WEBSERVICEURL"); //webService地址 long Timestamp = GetTimeStamp(); //SendMessage(int Id, string Name, string Psw, string Message, string Phone, int Timestamp) object result = null; try { //Message.ServiceSoap. service= new Message.ServiceSoap(); //Messages.ServiceSoapClient ser = new Messages.ServiceSoapClient(); //Messages.SendState c= ser.SendMessage(Id,Name,Psw,sendDoc,getTel,Timestamp); //result = c.Id.ToString() + "|" + c.State + "|" + c.FailPhone; result = DynamicServiceBind.InvokeWebService(webServiceURL, "SendMessage", new object[] { Id, Name, Psw, sendDoc, getTel, Timestamp }); } catch (Exception e) { } return(result); }
private void billOpen(string strSeq) { TabStrip1.ActiveTabIndex = 1; String prefix = ApiClientUtil.GetConfigCont("LICENSE_PATH"); gridPic.DataSource = getPicData(strSeq); gridPic.DataBind(); //imgBMPPATH.ImageUrl = "http://localhost:3788/captcha/CertificatePicture.aspx?seqno="+strSeq+"&rowno=1"; imgBMPPATH.ImageUrl = ApiUtil.GetConfigCont("LICENSE_PATH") + "/captcha/CertificatePicture.aspx?seqno=" + strSeq + "&rowno=1"; }
protected void gridPic_RowClick(object sender, GridRowClickEventArgs e) { TabStrip1.ActiveTabIndex = 1; String prefix = ApiClientUtil.GetConfigCont("LICENSE_PATH"); string seqno = gridPic.Rows[e.RowIndex].DataKeys[0].ToString(); string rowno = gridPic.Rows[e.RowIndex].DataKeys[1].ToString(); DataTable dt = gridPic_path(seqno, rowno); if (dt.Rows.Count > 0) { imgBMPPATH.ImageUrl = prefix + dt.Rows[0]["PICPATH"].ToString().Replace("~", ""); } else { Alert.Show("不要频繁点击,稍后片刻!"); } }
private void billOpen(string strSeq) { TabStrip1.ActiveTabIndex = 1; String prefix = ApiClientUtil.GetConfigCont("LICENSE_PATH"); gridPic.DataSource = getPicData(strSeq); gridPic.DataBind(); imgBMPPATH.ImageUrl = ApiUtil.GetConfigCont("LICENSE_PATH") + "/captcha/CertificatePicture.aspx?seqno=" + strSeq + "&rowno=1"; //DataTable mydt = gridPic_path1(strSeq); //if (mydt.Rows.Count > 0) //{ // imgBMPPATH.ImageUrl = prefix + mydt.Rows[0]["PICPATH"].ToString().Replace("~", ""); //} //else //{ // Alert.Show("不要频繁点击,稍后片刻!"); //} }
protected void gridPic_RowClick(object sender, GridRowClickEventArgs e) { TabStrip1.ActiveTabIndex = 1; String prefix = ApiClientUtil.GetConfigCont("LICENSE_PATH"); string seqno = gridPic.Rows[e.RowIndex].DataKeys[0].ToString(); string rowno = gridPic.Rows[e.RowIndex].DataKeys[1].ToString(); imgBMPPATH.ImageUrl = ApiUtil.GetConfigCont("LICENSE_PATH") + "/captcha/CertificatePicture.aspx?seqno=" + seqno + "&rowno=" + rowno; //DataTable dt = gridPic_path(seqno, rowno); //if (dt.Rows.Count > 0) //{ // imgBMPPATH.ImageUrl = prefix + dt.Rows[0]["PICPATH"].ToString().Replace("~", ""); //} //else //{ // Alert.Show("不要频繁点击,稍后片刻!"); //} }
private void billOpen(string strSeq) { TabStrip1.ActiveTabIndex = 1; String prefix = ApiClientUtil.GetConfigCont("LICENSE_PATH"); gridPic.DataSource = getPicData(strSeq); gridPic.DataBind(); DataTable mydt = gridPic_path1(strSeq); if (mydt.Rows.Count > 0) { imgBMPPATH.ImageUrl = prefix + mydt.Rows[0]["PICPATH"].ToString().Replace("~", ""); } else { Alert.Show("不要频繁点击,稍后片刻!"); } }