private void QueryStringVal() { foreach (object item in Request.QueryString) { string strToBeTest = Request.QueryString[item.ToString()].Replace(" ", ""); if (strToBeTest.Length > 0) { if (!PubEntAdminManager.ContentVal(strToBeTest, "^[0-9a-zA-Z=,]+$")) { Response.Redirect("InvalidInput.aspx"); } } } }
private void TypeVal() { if (this.HiddenVal.Value.Trim().Length > 0) { if (!PubEntAdminManager.ContentVal(this.HiddenVal.Value.Trim(), @"^\d{1}$")) { Response.Redirect("InvalidInput.aspx"); } } if (this.HiddenIsVK.Value.Trim().Length > 0) { if (!PubEntAdminManager.ContentVal(this.HiddenIsVK.Value.Trim(), @"^\d{1}$")) { Response.Redirect("InvalidInput.aspx"); } } }
public string[] GetProdInterfaceByProdID(string ProdID, int IsVK) { string [] ret = new string[1]; ret[0] = "InvalidInput"; bool pass = true; if ((!PubEntAdminManager.LenVal(ProdID, 10)) || (!PubEntAdminManager.LenVal(IsVK.ToString(), 1))) { pass = false; } if (!PubEntAdminManager.ContentVal(IsVK.ToString(), @"^\d{1}$")) { pass = false; } if ((PubEntAdminManager.OtherVal(ProdID))) { pass = false; } if ((PubEntAdminManager.SpecialVal2(ProdID.Replace(" ", "")))) { pass = false; } if (pass) { if (ProdID.Length > 0 && (IsVK == 0 || IsVK == 1)) { return(PE_DAL.GetProdInt(ProdID, IsVK).ToArray()); } else { return(ret); } } else { return(ret); } }