public static string Message(string msg, MsgType type) { String result = ""; if (type.Equals(MsgType.Success)) { result = @"<div class=""notification msgsuccess""> <a class=""close""></a> <p>" + msg + "</p></div>"; } else if (type.Equals(MsgType.Information)) { result = @"<div class=""notification msginfo""> <a class=""close""></a> <p>" + msg + "</p></div>"; } else if (type.Equals(MsgType.Alert)) { result = @"<div class=""notification msgalert""> <a class=""close""></a> <p>" + msg + "</p></div>"; } else if (type.Equals(MsgType.Error)) { result = @"<div class=""notification msgerror""> <a class=""close""></a> <p>" + msg + "</p></div>"; } return result; }
public void Show() { if (MsgType.Equals(MessageTypeEnum.AlertMessage.Information)) { ctlAlertImg.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/ok.png"; ctlMessageInformation.Text = MessageSource.GetMessage(Symbol); ctlMessageInformation.Visible = true; ctlMessageError.Visible = false; } else if (MsgType.Equals(MessageTypeEnum.AlertMessage.Error)) { ctlAlertImg.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/cancel.png"; ctlMessageError.Text = MessageSource.GetMessage(Symbol); ctlMessageError.Visible = true; ctlMessageInformation.Visible = false; } else { ctlAlertImg.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/alert.png"; ctlMessageInformation.Text = MessageSource.GetMessage(Symbol); ctlMessageInformation.Visible = true; ctlMessageError.Visible = false; } }
public void Show() { GlobalTranslate msg = SuGlobalTranslateQuery.ResolveMessage(msgCode, UserAccount.CurrentLanguageCode.ToString()); if (MsgType.Equals(MessageTypeEnum.AlertMessage.Confirmation)) { ctlMsgTopicLabel.Text = MessageTypeEnum.AlertMessage.Confirmation.ToString(); ctlMsgTypeImage.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/MsgConfirmation.gif"; } else if (MsgType.Equals(MessageTypeEnum.AlertMessage.Information)) { ctlMsgTopicLabel.Text = MessageTypeEnum.AlertMessage.Information.ToString(); ctlMsgCancelImageButton.Visible = false; ctlMsgTypeImage.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/MsgInfomaton.gif"; } else if (MsgType.Equals(MessageTypeEnum.AlertMessage.Error)) { ctlMsgTopicLabel.Text = MessageTypeEnum.AlertMessage.Error.ToString(); ctlMsgCancelImageButton.Visible = false; ctlMsgTypeImage.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/MsgError.gif"; } else { ctlMsgTopicLabel.Text = MessageTypeEnum.AlertMessage.Alert.ToString(); ctlMsgCancelImageButton.Visible = false; ctlMsgTypeImage.ImageUrl = "~/App_Themes/" + this.Page.StyleSheetTheme.ToString() + "/images/MsgWarning.gif"; } ctlMsgHeaderLabel.Text = msgCode; if (msg != null) { ctlMsgBodyLabel.Text = msg.TranslateWord; } CallOnObjectLookUpCalling(); this.UpdatePanelMessage.Update(); this.ctlPanelModalPopupExtender.Show(); }