public static AutoMsgUserExcelEntity ApplySendMsgService(AutoMsgUserExcelEntity automsgcancelordEntity) { AutoMsgCancelOrdDBEntity dbParm = (automsgcancelordEntity.AutoMsgCancelOrdDBEntity.Count > 0) ? automsgcancelordEntity.AutoMsgCancelOrdDBEntity[0] : new AutoMsgCancelOrdDBEntity(); string DataString = ""; DataString = DataString + "{\"method\":\"save\",\"data\":{\"syscode\":\"" + "CMS" + "\",\"reqid\":\"" + dbParm.CreateUser +"\",\"bizcode\":\"" + "CMS-JOB-用户短信提示" +"\","; DataString = DataString + "\"mobiles\":\"" + dbParm.CreateUser + "\",\"msg\":\"" + dbParm.Note1 + "\","; DataString = DataString + "\"sign\":\"" + PostSignKey("CMS" + dbParm.CreateUser) + "\"},\"version\":\"v1.0\"}"; string HotelFullRoomUrl = JsonRequestURLBuilder.applySendMsgV2(); CallWebPage callWebPage = new CallWebPage(); string strHotelFullRoom = callWebPage.CallWebByURL(HotelFullRoomUrl, DataString); JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom); if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"'))) { automsgcancelordEntity.Result = 1; automsgcancelordEntity.ErrorMSG = "保存成功!"; } else { automsgcancelordEntity.Result = 2; automsgcancelordEntity.ErrorMSG = "保存失败!" + JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "message").Trim('"'); } return automsgcancelordEntity; }
private static string ApplySendMsgService(DataRow drRow) { AutoMsgUserExcelEntity _automsgcancelordEntity = new AutoMsgUserExcelEntity(); _automsgcancelordEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _automsgcancelordEntity.LogMessages.Userid = "JOB System"; _automsgcancelordEntity.LogMessages.Username = "******"; _automsgcancelordEntity.AutoMsgCancelOrdDBEntity = new List<AutoMsgCancelOrdDBEntity>(); AutoMsgCancelOrdDBEntity appcontentDBEntity = new AutoMsgCancelOrdDBEntity(); appcontentDBEntity.CreateUser = drRow["USERID"].ToString().Trim(); appcontentDBEntity.Note1 = drRow["CONTENT"].ToString().Trim(); _automsgcancelordEntity.AutoMsgCancelOrdDBEntity.Add(appcontentDBEntity); _automsgcancelordEntity = AutoMsgCancelOrdSA.ApplySendMsgService(_automsgcancelordEntity); return _automsgcancelordEntity.ErrorMSG; }