private async void btnSendMMS_Click(object sender, RoutedEventArgs e) { statusProgress.Visibility = Visibility.Visible; txtResult.Visibility = Visibility.Collapsed; btnSendMMS.IsEnabled = false; clientId = "your_att_app_key"; clientSecret = "your_att_secret_key"; uriString = "https://api.att.com"; List <string> phoneNumbers = txtPhone.Text.Split(';').ToList <string>(); MmsService mmsService = new MmsService(new AttServiceSettings(clientId, clientSecret, new Uri(uriString))); List <ContentInfo> attachments = new List <ContentInfo>(); attachments.Add(_mmsContent); MmsResponse mmsResponse = await mmsService.SendMms(phoneNumbers, txtMessage.Text, attachments); if (null != mmsResponse) { txtResult.Visibility = Visibility.Visible; txtResult.Text = "Message has been sent"; } statusProgress.Visibility = Visibility.Collapsed; btnSendMMS.IsEnabled = true; }
private async void btnSendMMS_Click(object sender, RoutedEventArgs e) { statusProgress.Visibility = Visibility.Visible; txtResult.Visibility = Visibility.Collapsed; btnSendMMS.IsEnabled = false; clientId = "your_att_app_key"; clientSecret = "your_att_secret_key"; uriString = "https://api.att.com"; List<string> phoneNumbers = txtPhone.Text.Split(';').ToList<string>(); MmsService mmsService = new MmsService(new AttServiceSettings(clientId, clientSecret, new Uri(uriString))); List<ContentInfo> attachments = new List<ContentInfo>(); attachments.Add(_mmsContent); MmsResponse mmsResponse = await mmsService.SendMms(phoneNumbers, txtMessage.Text, attachments); if (null != mmsResponse) { txtResult.Visibility = Visibility.Visible; txtResult.Text = "Message has been sent"; } statusProgress.Visibility = Visibility.Collapsed; btnSendMMS.IsEnabled = true; }
public void Audit(string id, dynamic data) { var status = data["status"].ToString(); var comment = data["comment"].ToString(); var result = new MmsService().Audit(typeof(mms_drainpipeduct).Name, id, status, comment); MmsHelper.ThrowHttpExceptionWhen(result < 0, "信息审核失败[BillNo={0}],请重试或联系管理员!", id); }
public virtual void Audit(string id, JObject data) { var status = data["status"].ToString(); var comment = data["comment"].ToString(); var result = new MmsService().Audit("mms_receive", id, status, comment); MvcHelper.ThrowHttpExceptionWhen(result < 0, "单据审核失败[BillNo={0}],请重试或联系管理员!", id); }
public virtual void Audit(string id, JObject data) { var status = data["status"].ToString(); var comment = data["comment"].ToString(); var result = new MmsService().Audit(typeof(TMasterModel).Name, id, status, comment); MmsHelper.ThrowHttpExceptionWhen(result < 0, "单据审核失败[Object_ID={0}],请重试或联系管理员!", id); }
public string PostStorage(dynamic data) { string msg = ""; if (string.IsNullOrEmpty(WMS_BN_BillMainController.uc.Value)) { return("数据错误!"); } var result = new MmsService().WMS_OutAndIn(data["BillCode"].ToString(), WMS_BN_BillMainController.uc.Value, out msg); return(msg); }
public object Login(JObject request) { var UserCode = request.Value <string>("usercode"); var Password = request.Value <string>("password"); //用户名密码检查 if (String.IsNullOrEmpty(UserCode) || String.IsNullOrEmpty(Password)) { return new { status = "error", message = "用户名或密码不能为空!" } } ; //用户名密码验证 var result = this.GetModel(ParamQuery.Instance() .AndWhere("UserCode", UserCode) .AndWhere("Password", Password) .AndWhere("IsEnable", true)); if (result == null || String.IsNullOrEmpty(result.UserCode)) { return new { status = "error", message = "用户名或密码不正确!" } } ; //调用框架中的登陆机制 var loginer = new LoginerBase { UserCode = result.UserCode, UserName = result.UserName }; var effectiveHours = ZConfig.GetConfigInt("LoginEffectiveHours"); FormsAuth.SignIn(loginer.UserCode, loginer, 60 * effectiveHours); //登陆后处理 this.UpdateUserLoginCountAndDate(UserCode); //更新用户登陆次数及时间 this.AppendLoginHistory(request); //添加登陆履历 MmsService.LoginHandler(request); //MMS系统的其它的业务处理 //返回登陆成功 return(new { status = "success", message = "登陆成功!" }); }
/// <summary> /// Creates instance of <see cref="AttMmsService"/>. /// </summary> /// <param name="endPoint">Service endpoint.</param> /// <param name="apiKey">API key.</param> /// <param name="secretKey">Secret key.</param> public AttMmsService(string endPoint, string apiKey, string secretKey) : base(endPoint, apiKey, secretKey) { _mmsServiceWrapper = new MmsService(Settings); }
//生成批次信息及更新来源单剩余数量 protected override void OnAfterEdit(EditEventArgs arg) { MmsService.HandlerBillBatchesAfterEdit <mms_lossReport>(arg); }
//生成批次信息及更新来源单剩余数量 protected override void OnAfterEdit(EditEventArgs arg) { MmsService.HandlerBillBatchesAfterEdit <mms_transfer>(arg); }