-
Notifications
You must be signed in to change notification settings - Fork 7
/
common.cs
65 lines (59 loc) · 3.9 KB
/
common.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
namespace Analytics
{
public static class common
{
public static string noLogin = "You must login to the application to use this feature";
public static string noUserMatch = "Incorrect Email Id or Password. Please try again or register for an account.";
public static string userExists = "Email id already registered for another account. Please use different email id.";
public static string noPortfolioName = "Please login to application and then select portfolio in which you want to add stock entry.";
public static string noPortfolioNameToOpen = "Please select valid portfolio.";
public static string noSymbolFound = "No matching stock symbols found";
public static string noTextSearchSymbol = "Enter text in Search Stock to search stock symbol";
public static string noStockSelectedToAdd = "Please search & then select script to add.";
public static string noStockSelectedToShowGraph = "Please search & then select script to show graph.";
public static string noStockSelectedToGetQuote = "Please search & then select script to add.";
public static string noPortfolioSelectedToDelete = "Please select valid portfolio to delete.";
public static string testFlagTrue = "To use this feature login to application with \'Off-line mode?\' option un-checked.";
public static string noStockSelectedToDownload = "Please search & then select script to download data.";
public static string noQuoteAvailable = "Not able to get quote from market at this time, please try again later.";
public static string noValidNewPortfolioName = "Please enter valid portfolio name.";
public static string noValidKey = "Enter valid key!";
public static string noScriptSelectedInformationEntered = "Please make sure you have selected script and entered all information.";
public static string errorEditScript = "Error while updating the transaction.Please try again or hit back.";
public static string errorAllFieldsMandatory = "All fields are mandatory.";
public static string registrationComplete = "Registration complete. You can now login to application using the same email id & password .";
public static string portfolioExists = "Portfolio already exists.";
public static string noScriptsInPortfolio = "No scripts found in the portfolio";
public static string noFundsInPortfolio = "No Funds found in the portfolio";
public static string noPortfolioSelected = "Please select portfolio from the list";
public static string noTxnSelected = "Please select a transaction.";
public static string noFundSelected = "Please select fund house & fund name to view graph";
/// <summary>
/// Shows a basic MessageBox on the passed in page
/// </summary>
/// <param name="page">The Page object to show the message on</param>
/// <param name="message">The message to show</param>
/// <returns></returns>
public static void ShowMessageBox(Page page, string message)
{
Type cstype = page.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = page.ClientScript;
// Find the first unregistered script number
int ScriptNumber = 0;
bool ScriptRegistered = false;
do
{
ScriptNumber++;
ScriptRegistered = cs.IsStartupScriptRegistered(cstype, "PopupScript" + ScriptNumber);
} while (ScriptRegistered == true);
//Execute the new script number that we found
cs.RegisterStartupScript(cstype, "PopupScript" + ScriptNumber, "alert('" + message + "');", true);
}
}
}