This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Response.Write("<script>alert('Hello');</script>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void MakeQuarantineList(String strClientID) | |
{ | |
// get a list of batches that are quarantined for the current client. | |
// client dropdown too.... as this is admin level? for Now only the current | |
pnlQuarantineList.Visible = true; | |
pnlEditBatch.Visible = false; | |
pnlBatchImportRows.Visible = false; | |
pnlBatchImages.Visible = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void chkSelectAll_Clicked(Object sender, EventArgs e) | |
{ | |
//Response.Write("<script>alert('Test')</script>"); | |
CheckBox chkSelectAll = (CheckBox)sender; | |
foreach (RepeaterItem i in rptUserSelectView.Items) | |
{ | |
CheckBox chkSelect = (CheckBox)i.FindControl("chkSelect"); | |
chkSelect.Checked = chkSelectAll.Checked; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) | |
{ | |
// Get the subdirectories for the specified directory. | |
DirectoryInfo dir = new DirectoryInfo(sourceDirName); | |
DirectoryInfo[] dirs = dir.GetDirectories(); | |
if (!dir.Exists) | |
{ | |
throw new DirectoryNotFoundException( | |
"Source directory does not exist or could not be found: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static bool CreateBelowMinEmails() | |
{ | |
SqlConnection objConn = null; | |
SqlConnection objConn2 = null; | |
SqlDataReader drData = null; | |
SqlCommand objComm = null; | |
SqlCommand objComm2 = null; | |
string strEmail = "", strName = "", strUserID = "", strHeader = "", strBody = "", strFooter = ""; | |
string strMsg = "", strColor = "f5f5f5", strTemp = "", strNotificationSQL = ""; | |
string strPrevEmail = "", strPrevUserID = "", strPrevName = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Control FindControlRecursive(string controlId, Control parent) | |
{ | |
foreach (Control control in parent.Controls) | |
{ | |
Control result = FindControlRecursive(controlId, control); | |
if (result != null) | |
{ | |
return result; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DateTime FirstDayOfMonthFromDateTime(DateTime dateTime) | |
{ | |
return new DateTime(dateTime.Year, dateTime.Month, 1); | |
} | |
public DateTime LastDayOfMonthFromDateTime(DateTime dateTime) | |
{ | |
DateTime firstDayOfTheMonth = new DateTime(dateTime.Year, dateTime.Month, 1); | |
return firstDayOfTheMonth.AddMonths(1).AddDays(-1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Executes a non query SQL command with a Dictionary Object of Parameters | |
/// </summary> | |
/// <param name="strSQL"></param> | |
/// <param name="colParams"></param> | |
/// <returns></returns> | |
private void ExecuteNonQuery(string strSQL, Dictionary<string, string> dctParams) | |
{ | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Returns a DataTable for a SQL Query with a Dictionary Object of Parameters | |
/// </summary> | |
/// <param name="strSQL"></param> | |
/// <param name="colParams"></param> | |
/// <returns></returns> | |
private DataTable GetDataTable(string strSQL, Dictionary<string,string> colParams) | |
{ | |
DataTable dt = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool p(int n) | |
{ | |
if (n == 1 || n % 2 == 0) return false; | |
if (n == 2) return true; | |
var b = (int)Math.Floor(Math.Sqrt(n)); | |
int i = 3; | |
while (i <= b) | |
{ |
OlderNewer