public static string LoginURL(Guid?applicationId) { return(get_value(applicationId, RVSettingsItem.SSOLoginURL).Replace("[return_url]", PublicConsts.get_complete_url(applicationId, PublicConsts.LoginPage))); }
public void SendMessage(ref Event Calendar, ref List <Guid> relatedUserIds, string type, bool isRegisterMode, ref string message) { try { if (relatedUserIds != null && relatedUserIds.Count > 1) { string strRenderedKnowledgeDomains = ""; List <Modules.CoreNetwork.Node> CalenNodesKnowledgeDomains = EventsController.get_related_nodes(paramsContainer.Tenant.Id, Calendar.EventID.Value); if (CalenNodesKnowledgeDomains != null && CalenNodesKnowledgeDomains.Count() != 0) { int Counter = 0; foreach (Modules.CoreNetwork.Node CalenNode in CalenNodesKnowledgeDomains) { Counter++; if (Counter != 1) { strRenderedKnowledgeDomains += " ، "; } System.Web.UI.HtmlControls.HtmlAnchor a = new System.Web.UI.HtmlControls.HtmlAnchor(); a.InnerText = CalenNode.Name; a.Target = "_blank"; a.HRef = PublicConsts.get_client_url(PublicConsts.NodePage) + "/" + CalenNode.NodeID.ToString(); StringBuilder SB = new StringBuilder(); HtmlTextWriter TW = new HtmlTextWriter(new StringWriter(SB)); a.RenderControl(TW); strRenderedKnowledgeDomains += SB.ToString(); } } relatedUserIds.Remove(paramsContainer.CurrentUserID.Value); string strTitle = ""; string PostFix = ""; if (isRegisterMode) { strTitle = "ثبت " + type; PostFix = " ثبت شد"; } else { strTitle = "ویرایش " + type; PostFix = " ویرایش شد ، به تغییرات اعمال شده دقت فرمایید"; } string strMessage = "رویدادی از نوع " + "\" " + type + " \" با عنوان " + "\" " + Calendar.Title + " \"" + " برای تاریخ " + "\" " + PublicMethods.get_local_date(Calendar.BeginDate.Value) + " \"" + " شامل موضوعات : " + strRenderedKnowledgeDomains + PostFix; if (string.IsNullOrEmpty(strRenderedKnowledgeDomains)) { strMessage = "رویدادی از نوع " + "\" " + type + " \" با عنوان " + "\" " + Calendar.Title + " \"" + " برای تاریخ " + "\" " + PublicMethods.get_local_date(Calendar.BeginDate.Value) + " \"" + PostFix; } else { strMessage = "رویدادی از نوع " + "\" " + type + " \" با عنوان " + "\" " + Calendar.Title + " \"" + " برای تاریخ " + "\" " + PublicMethods.get_local_date(Calendar.BeginDate.Value) + " \"" + " شامل موضوعات : " + strRenderedKnowledgeDomains + PostFix; } bool result = MSGController.bulk_send_message(paramsContainer.Tenant.Id, paramsContainer.CurrentUserID.Value, relatedUserIds, strTitle, strMessage); if (!result) { message = "خطا در ارسال پیام به کاربران انتخاب شده"; } } } catch (Exception ex) { message = "خطا در ارسال پیام به کاربران انتخاب شده"; } }