/// <summary> /// 获取文章管理页面列表 /// </summary> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="sortName"></param> /// <param name="sortOrder"></param> /// <param name="searchText"></param> /// <param name="cateAlias"></param> /// <param name="uniqueId"></param> /// <param name="title"></param> /// <returns></returns> public async Task <PostResult> GetArticles(int pageIndex, int pageSize, string sortName, string sortOrder, string searchText, string cateAlias, string uniqueId, string title) { var result = new PostResult(); var query = await _posts.Collection.Find(x => x.IsActive).ToListAsync(); if (!string.IsNullOrWhiteSpace(searchText)) { query = query.Where(x => x.Content != null ? (x.UniqueId.ToUpper().Contains(searchText.ToUpper()) || x.Title.ToUpper().Contains(searchText.ToUpper()) || x.Summary.ToUpper().Contains(searchText.ToUpper()) || x.Content.ToUpper().Contains(searchText.ToUpper())) : (x.UniqueId.ToUpper().Contains(searchText.ToUpper()) || x.Title.ToUpper().Contains(searchText.ToUpper()) || x.Summary.ToUpper().Contains(searchText.ToUpper()))).ToList(); } if (!string.IsNullOrWhiteSpace(cateAlias)) { query = query.Where(x => x.CategoryAlias.ToUpper() == cateAlias.ToUpper()).ToList(); } if (!string.IsNullOrWhiteSpace(uniqueId)) { query = query.Where(x => x.UniqueId.ToUpper().Contains(uniqueId.ToUpper())).ToList(); } if (!string.IsNullOrWhiteSpace(title)) { query = query.Where(x => x.Title.ToUpper().Contains(title.ToUpper())).ToList(); } result.PostCount = query.Count; switch (sortName) { case "ModifyTime": if (sortOrder == "desc") { query = query.OrderByDescending(x => x.ModifyTime).ThenByDescending(x => x.CreateTime).ToList(); } else { query = query.OrderBy(x => x.ModifyTime).ThenBy(x => x.CreateTime).ToList(); } break; case "ViewCount": if (sortOrder == "desc") { query = query.OrderByDescending(x => x.ViewCount).ThenByDescending(x => x.CreateTime).ToList(); } else { query = query.OrderBy(x => x.ViewCount).ThenBy(x => x.CreateTime).ToList(); } break; default: if (sortOrder == "desc") { query = query.OrderByDescending(x => x.CreateTime).ToList(); } else { query = query.OrderBy(x => x.CreateTime).ToList(); } break; } result.PostList = query.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); return(result); }
/// <summary> /// Retrieve a post based on id. /// </summary> /// <param id="id">id od the post.</param> /// <returns>Detailed post information.</returns> public async Task <ActionResult <Post> > Get(int id) { PostResult result = null; Post post; try { logger.LogInformation("Acquiring details for {Posts}.", id); result = await postsClient.GetPostById(id); post = new Post() { Id = id, Title = result.Title, Body = result.Body }; } catch (HttpRequestException ex) { logger.LogWarning(ex, "Http request failed."); return(StatusCode(StatusCodes.Status502BadGateway, "Failed request to external resource.")); } catch (TimeoutRejectedException ex) { logger.LogWarning(ex, "Timeout occurred when retrieving details for {Posts}.", id); //sematic logging return(StatusCode(StatusCodes.Status504GatewayTimeout, "Timeout on external web request.")); } catch (Exception ex) { logger.LogError(ex, "Unknown exception occurred while retrieving posts details."); return(StatusCode(StatusCodes.Status500InternalServerError, "Request could not be processed.")); } return(Ok(post)); }
//public void Post([FromBody] string value) public IActionResult Post([FromBody] int length) { byte[] saltBytes = new byte[length]; using (var rng = RandomNumberGenerator.Create()) { rng.GetBytes(saltBytes); PostResult result = new PostResult { SaltLength = length, Base64Salt = Convert.ToBase64String(saltBytes) }; return(Ok(result)); } //return this.NoContent(); //System.Diagnostics.Debug.Write(value); //return result; //return Ok(); // var responseMessage = new HttpResponseMessage<List<string>>(errors, HttpStatusCode.BadRequest); // throw new HttpResponseException(responseMessage); }
public bool EnsureLogin() { int loop = 0; while (loop < 3) { Request.Type = PostRequest.PostTypeEnum.Get; Request.PostItems.Clear(); Request.UrlReferer = "http://edeneternal.aeriagames.com/itemmall/free-rewards"; PostResult result = Request.Post("http://edeneternal.aeriagames.com/freerewards/get-event/ee"); if (result.ResponseString.Contains("\"uid\":0") == true) { Login(); loop++; } else { //CConsole.StatusLine("[{0}] Login successfull", Username); return(true); } } CConsole.ErrorLine("[{0}] Failed to login {1} times, break..", Username, loop); return(false); }
/// <summary> /// 网络请求结果回调 /// </summary> /// <param name="result">请求结果</param> public void onResult(String result) { owner.log("RequestPostCallback onResult result=" + result); // 结果解析 PostResult postResult = JsonUtility.FromJson <PostResult>(result); if (isOneLogin) { if (Constants.SUCCESS_CODE.Equals(postResult.status)) { owner.toast("OneLogin 一键登录成功,手机号:" + postResult.result); } else { owner.toast("OneLogin 一键登录失败"); } // 取号结束后关闭授权页 owner.olManager.Call("dismissAuthActivity"); } else { if (Constants.SUCCESS_CODE.Equals(postResult.status)) { owner.toast("OnePass 本机号码认证成功"); } else { owner.toast("OnePass 本机号码认证失败"); } } }
public void TryCatchItem() { Request.Type = PostRequest.PostTypeEnum.Get; Request.PostItems.Clear(); Request.UrlReferer = "http://edeneternal.aeriagames.com/itemmall/free-rewards"; PostResult result = Request.Post("http://edeneternal.aeriagames.com/freerewards/get-event/ee"); while (result.ResponseString.Contains("\"uid\":0") == true) { // Dont forget to save the last object! // Even if login failed.. mLastObject = JObject.Parse(result.ResponseString); InitializeWaiting(); return; } mLastObject = JObject.Parse(result.ResponseString); if ((TimeLast + CRAP_DELAY) < TimeNow) { CrapItem(); } else { InitializeWaiting(); } }
// fill each individual row in sql using the sender object public static void FillRow(object postResultObj, out SqlString XMLPosted, out SqlXml XMLResponse, out SqlBoolean Success, out SqlBoolean Failure, out SqlString AdditionalInfo, out SqlDateTime Started, out SqlDateTime Finished, out SqlString Code, out SqlString ReturnValue ) { { PostResult pr = (PostResult)postResultObj; XMLPosted = pr.XMLPosted; XMLResponse = pr.XMLResponse; Success = pr.Success; Failure = pr.Failure; AdditionalInfo = pr.AdditionalInfo; Started = pr.Started; Finished = pr.Finished; Code = pr.Code; ReturnValue = pr.ReturnValue; } }
public void OnPublishSucceeded(BlogPost blogPost, PostResult postResult) { ((IBlogPostEditor)categoryDropDown).OnPublishSucceeded(blogPost, postResult); List <BlogPostKeyword> keywords = new List <BlogPostKeyword>(); keywords.AddRange(_targetBlog.Keywords); string[] keywordList = blogPost.Keywords.Split(','); foreach (string str in keywordList) { string name = str.Trim(); if (string.IsNullOrEmpty(name)) { continue; } keywords.Add(new BlogPostKeyword(name)); } _targetBlog.Keywords = keywords.ToArray(); LoadTagValues(); isDirty = false; }
public JsonResult Delete(int id) { var deleteResult = RoomRepository.Delete(id); var result = new PostResult(deleteResult); return(Json(result)); }
public PostResult <UsuarioDTO> UpdateUser(int id, UsuarioDTO user) { try { var usuario = context.Usuarios.Find(id); usuario.Nombre = user.Nombre; usuario.Apellido = user.Apellido; usuario.Mail = user.Mail; usuario.FechaNacimiento = user.FechaNacimiento; context.SaveChanges(); var responseUpdateUsuario = new PostResult <UsuarioDTO> { ObjectResult = user, }; return(responseUpdateUsuario); } catch (Exception ex) { var responseUpdateUsuario = new PostResult <UsuarioDTO> { MensajePersonalizado = ex.Message }; return(responseUpdateUsuario); } }
private async Task <PostResult <TResponse> > MakeRequestPure <TRequest, TResponse>(string uri, HttpMethod method, TRequest content = default) { using (var request = new HttpRequestMessage(method, uri)) { FillBody(request, content); try { using (var response = await _client.SendAsync(request)) { if (response.StatusCode != HttpStatusCode.OK) { return(PostResult <TResponse> .WithError(PostErrorCodes.RemoteRequestIsFailed)); } var result = await response.Content.ReadAsStringAsync(); return(_serializer.Deserialize <PostResult <TResponse> >(result)); } } catch (Exception) { return(PostResult <TResponse> .WithError(PostErrorCodes.RemoteRequestIsFailed)); } } }
public PostResult <UsuarioDTO> SaveUsuarioRegistrado(UsuarioDTO user) { try { var datosDelUsuario = new Usuarios() { IdUsuario = user.IdUsuario, Nombre = user.Nombre, Apellido = user.Apellido, Mail = user.Mail, ImagenPerfil = user.ImagenPerfil, FechaNacimiento = user.FechaNacimiento }; context.Usuarios.Add(datosDelUsuario); context.SaveChanges(); var responseUsuarios = new PostResult <UsuarioDTO> { ObjectResult = user, }; return(responseUsuarios); } catch (Exception ex) { var responseUsuario = new PostResult <UsuarioDTO> { MensajePersonalizado = ex.Message, }; return(responseUsuario); } }
// Once a conversation has been started we are able to send and receive messages from the Bot // For this, we are just making a POST request to the BOT and if we receive a MessageID we're confirming // the BOT received our message, so we can make a GET request and we'll get a list of all the activities // (chats) the Bot had with the current MessageID. // Right now, everytime we make a GET request we'll receive all the conversation history. // For future commits we'll work with watermarks to receive only the latest message. public async void SendMessage() { myChat.Add("Me: " + myMessage); // Posting an activity to Bot postResult = JsonConvert.DeserializeObject <PostResult>(await PostAsync(botUriChat, content)); // if Bot succesfully received the message then it replies with an ID: if (postResult != null) { // Polling the Bot's reply with a GET request // The first time we make a GET request we don't have a watermark for the BOT to know which messages // are the latest in comparison to our last request so we don't send a watermark if (firstMessage) { getResult = JsonConvert.DeserializeObject <GetResult>(await chatClient.GetStringAsync(botUriChat)); firstMessage = false; } // Now that we have a watermark we can send it so the Bot framework won't send the whole conversation history everytime // we make a GET request. else { string jsonResultFromBot = await chatClient.GetStringAsync(botUriChat + "?watermark=" + getResult.watermark); getResult = JsonConvert.DeserializeObject <GetResult>(jsonResultFromBot); } // The BOT will return 2 activities instead of the whole conversation now that we are using watermarks. // But why 2 and not just 1? That is because the message we sent wasn't part of the conversation yet since the last GET // request we did, so both OUR message and the BOT's reply come as new activities in the latest GET. myChat.Add("Bot: " + getResult.activities[1].text); } }
public IActionResult Get(int PostID) { MySqlConnection conn = new MySqlConnection(_appSettings.ConnectionString); PostResult result = new PostResult(); try { conn.Open(); using (MySqlCommand cmd = new MySqlCommand("SELECT postID, AuthorID, Title, Text, Created FROM Post where postID = " + PostID, conn)) { MySqlDataReader dataReader = cmd.ExecuteReader(); while (dataReader.Read()) { result.PostID = dataReader.GetInt32(0); result.AuthorID = dataReader.GetInt32(1); result.Title = dataReader.GetString(2); result.Text = dataReader.GetString(3); result.Created = dataReader.GetDateTime(4); } } return(new OkObjectResult(result)); } catch (Exception ex) { return(BadRequest(ex)); } finally { conn.Dispose(); conn.Close(); } }
public ActionResult SaveNavButton(RequestData data) { PostResult result = new PostResult(); string navId = data.Get("navId"); string btnIdString = data.Get("btnIdString"); string[] btnIdArray = btnIdString.Split(','); using (TranModel tran = new DBTranModel()) { BASNAVBTNModel delModel = new BASNAVBTNModel(); delModel.Deleting(tran, BASNAVBTN.NAVID == navId); BASNAVBTNModel insModel = null; for (int i = 0; i < btnIdArray.Length; i++) { string btnId = btnIdArray[i]; insModel = new BASNAVBTNModel(); insModel.NAVID = navId.ToInt32(); insModel.BTNID = btnId.ToInt32(); insModel.SORTNO = i; insModel.Inserting(tran); } bool ret = tran.Execute(); result.Success = ret; } return(Json(result)); }
public void Should_send_successfully_and_had_four_button_in_two_row() { GapClient gapClient = new GapClient(Token); ReplyKeyboard keyboard = new ReplyKeyboard(); keyboard.AddRow(new List <ReplyKeyboardItem>() { new ReplyKeyboardItem("item1", "value one"), new ReplyKeyboardItem("item2", "value two"), }); keyboard.AddRow(new List <ReplyKeyboardItem>() { new ReplyKeyboardLocationItem("location"), new ReplyKeyboardContactItem("contact") }); Message message = new Message { ChatId = ChatId, Data = "salam iran", ReplyKeyboard = keyboard }; PostResult result = gapClient.Send(message).Result; result.StatusCode.Should().Be(StatusCode.Success); }
public void Should_get_error_on_invoiceInquiry_check_because_invoice_not_payd() { GapClient gapClient = new GapClient(Token); Invoice invoice = new Invoice() { ChatId = ChatId, Amount = 20_000, Currency = Currency.USD, Description = "no comment" }; PostResult invoiceResult = gapClient.Invoice(invoice).Result; InvoiceVerfication invoiceVerfication = new InvoiceVerfication() { ChatId = ChatId, RefId = invoiceResult.Id }; PostResult <InvoiceVerficationResult> verificationResult = gapClient.InvoiceVerification(invoiceVerfication).Result; verificationResult.Id.Should().BeNull(); verificationResult.ErrorMessage.Should().BeNull(); verificationResult.StatusCode.Should().Be(200); verificationResult.Data.Status.Should().Be(InvoiceStatus.Error); }
public ActionResult SaveUserRole(RequestData data) { bool isSuccess = false; PostResult result = new PostResult(); string userId = data.Get("userId"); string roleIdString = data.Get("roleIdString"); string[] roleIdArray = roleIdString.Split(','); BASUSERROLEModel delModel = new BASUSERROLEModel(); result.Success = delModel.Delete(BASUSERROLE.USERID == userId); using (TranModel tran = new DBTranModel()) { BASUSERROLEModel insModel = null; for (int i = 0; i < roleIdArray.Length; i++) { string roleId = roleIdArray[i]; if (roleId != "") { insModel = new BASUSERROLEModel(); insModel.USERID = userId.ToInt32(); insModel.ROLEID = roleId.ToInt32(); insModel.Inserting(tran); isSuccess = true; } } bool ret = tran.Execute(); result.Success = isSuccess ? ret : result.Success; } return(Json(result)); }
private void CrapItem() { PostResult result = null; CConsole.InfoLine("[{0}] Crapping Item *_*", Username); Request.Type = PostRequest.PostTypeEnum.Post; Request.UrlReferer = "http://edeneternal.aeriagames.com/itemmall/free-rewards"; Request.PostItems.Clear(); Request.AdditionalHeader.Add("X-Requested-With", "XMLHttpRequest"); Request.AdditionalHeader.Add("X-Request", "JSON"); result = Request.Post("http://edeneternal.aeriagames.com/freerewards/play/33"); try { JObject responseObj = JObject.Parse(result.ResponseString); int error = int.Parse(((JValue)responseObj["error_code"]).ToString()); if (error == 0) { int success = int.Parse(((JValue)responseObj["is_successful"]).ToString()); if (success == 1) { JObject wonItem = (JObject)responseObj["won_item"]; string itemName = ((JValue)wonItem["name"]).ToString(); CConsole.StatusLine("[{0}] Got the item: {1}", Username, itemName); } else { CConsole.ErrorLine("[{0}] Failed to crap item, success was 0? [Please report this to GodLesZ!]", Username); Request.AdditionalHeader.Clear(); return; } } } catch (Exception e) { CConsole.ErrorLine("[{0}] Failed to crap item - exception message: {1}", Username, e.Message); Request.AdditionalHeader.Clear(); return; } result = Request.Post("http://edeneternal.aeriagames.com/freerewards/redeem/ee"); try { JObject redeemResponse = JObject.Parse(result.ResponseString); int error = int.Parse(((JValue)redeemResponse["error_code"]).ToString()); string message = ((JValue)redeemResponse["message"]).ToString(); if (error == 0) { CConsole.StatusLine("[{0}] Rdeemed the item successfully", Username); } else { CConsole.ErrorLine("[{0}] Redeem failed - code {1}, message: {2}", Username, error, message); } } catch (Exception e) { CConsole.ErrorLine("[{0}] Failed to redeem the item - exception message: {1}", Username, e.Message); return; } finally { Request.AdditionalHeader.Clear(); } }
public void Send_typing_action() { GapClient gapClient = new GapClient(Token); PostResult postResult = gapClient.SendTypingAction(ChatId).Result; postResult.StatusCode.Should().Be(200); }
public async Task <PostResult> Send(Message message) { HttpResponseMessage response = await _client.PostAsync(baseUrl + "sendMessage", MakeUrl(message)); PostResult postResult = await GetResult(response); return(postResult); }
public void Delete_should_be_successfull_with_invalid_messageId() { GapClient gapClient = new GapClient(Token); PostResult deleteResult = gapClient.Delete(ChatId, "555555").Result; deleteResult.StatusCode.Should().Be(200); }
private void CompletedGoldPrice(PostResult rs) { var json = JObject.Parse(rs.Result); BuyGoldPrice = Convert.ToInt32(HotItemController.CurrentApi.ParseBuyGoldValue(json));//json["results"]["coins"]["coins_per_gem"].ToObject<int>(); _isBuyGoldActive = true; }
public static PostResult MapToPostResult(JsonObject resultData) { var resultDict = (IDictionary <string, object>)resultData; var postResult = new PostResult(); postResult.Id = resultDict.ToString("id"); return(postResult); }
/// <summary> /// 返回操作结果 /// </summary> /// <param name="context"></param> /// <param name="result"></param> /// <param name="msg"></param> /// <param name="data"></param> private void OperateResult(bool result, string msg = "", object data = null) { PostResult postResult = new PostResult(); postResult.Success = result; postResult.Message = msg; postResult.Data = data; context.Response.Write(SerializerHelper.Serialize(postResult)); }
public override PostResult HandlePost(CmsPage page, Dictionary <string, string> FormParameters) { ModuleNavigationAction navigationAction = GetNavigationActionByTagName("{SubmitButton}"); PostResult postResult = base.getNewPostResult(navigationAction); string errorMsg = ""; try { //op save button geklikt BaseUser user = WebSessionHelper.CurrentSiteUser; if (user == null) { errorMsg += "Geen geldige gebruiker geladen. U moet eerst aanmelden"; } else { bool validPassword = true; if (FormParameters.ContainsKey("CurrentPasswordTextbox")) { //validPassword = user...; } user.ForeName = FormParameters.ContainsKey("ForeNameTextbox") ? FormParameters["ForeNameTextbox"] : ""; user.NamePrefix = FormParameters.ContainsKey("NamePrefixTextbox") ? FormParameters["NamePrefixTextbox"] : ""; user.Name = FormParameters.ContainsKey("NameTextbox") ? FormParameters["NameTextbox"] : ""; user.Email = FormParameters.ContainsKey("EmailTextbox") ? FormParameters["EmailTextbox"] : ""; //user.Gender = FormParameters.ContainsKey("Gender") ? FormParameters["Gender"] : ""; //user.BirthDate = FormParameters.ContainsKey("BirthDateTextbox") ? Convert.ToDateTime(FormParameters["BirthDateTextbox"]) : ""; user.Address = FormParameters.ContainsKey("AddressTextbox") ? FormParameters["AddressTextbox"] : ""; user.Postalcode = FormParameters.ContainsKey("PostcodeTextbox") ? FormParameters["PostcodeTextbox"] : ""; user.City = FormParameters.ContainsKey("CityTextbox") ? FormParameters["CityTextbox"] : ""; user.Country = FormParameters.ContainsKey("CountryTextbox") ? FormParameters["CountryTextbox"] : ""; string newPassword = FormParameters.ContainsKey("NewPasswordTextbox") ? FormParameters["NewPasswordTextbox"] : ""; if (newPassword != null && newPassword != String.Empty) { //check } } if (errorMsg != String.Empty) { new PostResult() { ErrorMessage = errorMsg }; } else { postResult.HtmlResult += Regex.Match(this.Content, "{SuccessTemplate}(.*?){/SuccessTemplate}", RegexOptions.Singleline).ToString().Replace("{SuccessTemplate}", "").Replace("{/SuccessTemplate}", ""); //Publish2(page); } } catch (Exception ex) { postResult = base.HandlePostError(ex); } return(postResult); }
public EzPostResult( PostResult result ) { if (result.item != null) { Item = new EzMessage(result.item); } }
void IBlogPostEditor.OnPublishSucceeded(BlogPost blogPost, PostResult postResult) { using (controller.SuspendLogic()) { controller.OnPublishSucceeded(blogPost, postResult); // slug can be modified by the service textSlug.Text = blogPost.Slug; } }
public virtual object Process(HttpContext context) { YZRequest request = new YZRequest(context); int stepid = request.GetInt32("StepID"); string uid = request.GetString("uid", YZAuthHelper.LoginUserAccount); //共享任务uid为空,会导致重定向到登录页面,产生异常 using (BPMConnection cn = new BPMConnection()) { string orguid = YZAuthHelper.LoginUserAccount; YZAuthHelper.SetAuthCookie(uid); try { cn.WebOpen(); } finally { YZAuthHelper.SetAuthCookie(orguid); } ProcessInfo processInfo = BPMProcess.GetProcessInfo(cn, stepid); if (processInfo.Links.Count == 0) { throw new BPMException(BPMExceptionType.MissOutLink, processInfo.NodeName); } string postXml = @"{0} <XForm> <Header> <Method>Process</Method> <PID>{1}</PID> <Action>{2}</Action> <Comment></Comment> </Header> <FormData> </FormData> </XForm>"; postXml = String.Format(postXml, "<?xml version=\"1.0\"?>", stepid, YZUtility.EncodeXMLInnerText(processInfo.Links[0].DisplayString)); using (MemoryStream postStream = new MemoryStream(Encoding.UTF8.GetBytes(postXml))) { PostResult postResult = BPMProcess.Post(cn, postStream); return(new { success = true, result = (postResult.PostResultType == PostResultType.TaskFinishedApproved || postResult.PostResultType == PostResultType.TaskFinishedRejected) ? "finished" : "running" }); } } }
public ActionResult SavePwd(RequestData data) { PostResult result = new PostResult(); BASUSERModel model = new BASUSERModel(); model.PASSWORD = StringHelper.MD5String(data.Get("pwd")); bool ret = model.Update(BASUSER.ID == data.Get("userId")); result.Success = ret; return(Json(result)); }
public DatasetUpload(VerifyResult verifyResult, PostResult postResult, string datasetId = null) { DatasetId = datasetId; FileProperty = postResult.Properties; UploadFormatType = verifyResult.UploadFormatType; Columns = verifyResult.Columns; FlatDSUpdateOptions = verifyResult.FlatDSUpdateOptions; if (verifyResult.MetadataDetails != null) { Name = verifyResult.MetadataDetails.DatasetName; Description = verifyResult.MetadataDetails.Description; Source = verifyResult.MetadataDetails.Source; Url = verifyResult.MetadataDetails.DatasetRef; PubDate = verifyResult.MetadataDetails.PublicationDate; AccessedOn = verifyResult.MetadataDetails.AccessedOn; } }
public static string GetPostResultDisplayStringShort(PostResult postResult) { //获得处理结果 string message; string customMessage = postResult.CustomMessage; if (!String.IsNullOrEmpty(customMessage)) customMessage = "[" + customMessage + "]"; switch (postResult.PostResultType) { case PostResultType.HasSentToOtherUsers: message = String.Format(Resources.YZStrings.Aspx_PostResult_HasSentToOtherUsers1, YZStringHelper.GetUserNameListString(postResult.Recipients), customMessage); break; case PostResultType.InWaitingOtherUsers: message = String.Format(Resources.YZStrings.Aspx_PostResult_InWaitingOtherUsers1, YZStringHelper.GetUserNameListString(postResult.Recipients), customMessage); break; case PostResultType.TaskInWaiting: message = String.Format(Resources.YZStrings.Aspx_PostResult_TaskInWaiting1, customMessage); break; case PostResultType.TaskFinishedApproved: message = String.Format(Resources.YZStrings.Aspx_PostResult_TaskFinishedApproved1, customMessage); break; case PostResultType.TaskFinishedRejected: message = String.Format(Resources.YZStrings.Aspx_PostResult_TaskFinishedRejected1, customMessage); break; case PostResultType.RecedeRestarted: message = String.Format(Resources.YZStrings.Aspx_PostResult_RecedeRestarted1, YZStringHelper.GetUserNameListString(postResult.Recipients), customMessage); break; default: message = String.Empty; break; } return message; }