protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { string strConfid = ((Label)e.Item.Cells[0].Controls[1]).Text; int confid = Convert.ToInt32(strConfid); string confname = ((TextBox)e.Item.Cells[1].Controls[1]).Text; string strsDate = ((TextBox)e.Item.Cells[2].Controls[1]).Text; DateTime sDate = Convert.ToDateTime(strsDate); string streDate = ((TextBox)e.Item.Cells[3].Controls[1]).Text; DateTime eDate = Convert.ToDateTime(streDate); string strMaxOrder = ((TextBox)e.Item.Cells[4].Controls[1]).Text; int maxOrder = Convert.ToInt32(strMaxOrder); Boolean valid = false; Boolean validnum = false; Boolean validlen = false; if (confname.Length > 0) { valid = PubEntAdminManager.OtherVal(confname); validnum = PubEntAdminManager.SpecialVal2(confname); validlen = PubEntAdminManager.LenVal(confname, 10); } if ((valid == false) && (validnum == false) && (validlen == true)) { this.UpdateConfData(confid, confname, maxOrder, sDate, eDate); } else { Response.Redirect("InvalidInput.aspx"); } }
private void SpecialVal() { if ((PubEntAdminManager.SpecialVal2(this.TxtPubid.Text.Replace(" ", "")))) { Response.Redirect("InvalidInput.aspx"); } }
private void LenVal() { if ((!PubEntAdminManager.LenVal(this.TxtPubid.Text, 50))) { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.TxtPubid.Text))) { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal2(Request["__SCROLLLOC"].ToString().Trim()))) { Response.Redirect("InvalidInput.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (PubEntAdminManager.TamperProof) { if (PubEntAdminManager.ContainURLQS(PubEntAdminManager.strUnauthorizedDetail)) { this.lblreason.Text = PubEntAdminManager.GetURLQS(PubEntAdminManager.strUnauthorizedDetail); } else { this.lblreason.Text = String.Empty; } } else { if (Request.QueryString[PubEntAdminManager.strUnauthorizedDetail] != null) { this.lblreason.Text = Request.QueryString[PubEntAdminManager.strUnauthorizedDetail].ToString(); } else { this.lblreason.Text = String.Empty; } } }
private void SpecialVal() { if ((PubEntAdminManager.SpecialVal2(Request["__SCROLLLOC"].ToString().Trim().Replace(" ", "")))) { Response.Redirect("InvalidInput.aspx"); } }
protected void NewPubCreateVal() { if ((!PubEntAdminManager.LenVal(this.ProdID, 10))) { Response.Redirect("InvalidInput.aspx"); } //------------------------ if ((PubEntAdminManager.OtherVal(this.ProdID))) { Response.Redirect("InvalidInput.aspx"); } foreach (string s in this.sarr) { if ((PubEntAdminManager.OtherVal(s))) { Response.Redirect("InvalidInput.aspx"); } } //------------------------ if ((PubEntAdminManager.SpecialVal2(this.ProdID.Replace(" ", "")))) { Response.Redirect("InvalidInput.aspx"); } foreach (string s in this.sarr) { if ((PubEntAdminManager.SpecialVal2(s))) { Response.Redirect("InvalidInput.aspx"); } } }
protected void gvResult_ItemCommand(object source, DataGridCommandEventArgs e) { string vInactive = ((System.Web.UI.WebControls.Button)(e.CommandSource)).Text; if (vInactive == "Delete") { gvResult_DeleteCommand(source, e); } if (vInactive == "Rotation Publications") { string strConfid = ((Label)e.Item.Cells[0].Controls[1]).Text; int confid = Convert.ToInt32(strConfid); string strConfname = ((Label)e.Item.Cells[1].Controls[1]).Text; string strDates = ((Label)e.Item.Cells[2].Controls[1]).Text + " - " + ((Label)e.Item.Cells[3].Controls[1]).Text; gvRotatPubs.DataSource = LU_DAL.DisplayRotationPubs(confid); gvRotatPubs.EmptyDataText = "Sorry, no publications have been selected for " + strConfname; gvRotatPubs.Caption = "<strong>Rotation Publications for " + strConfname + "</strong><br>" + strDates + "<br><br>"; gvRotatPubs.DataBind(); PubEntAdminManager.ExportToExcel(gvRotatPubs, this.Page); //PubEntAdminManager.ExportGridViewToExcel(gvRotatPubs, "RotationPublicationsNew", "<strong>Rotation Publications for " + strConfname + "</strong><br>" + strDates, this.Page.Response); //ExportRoutines.ExportToExcel(this.Page, "RotationPublications", "<strong>Rotation Publications for " + strConfname + "</strong><br>" + strDates, this.gvRotatPubs); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtNewPub.Text)) || (PubEntAdminManager.OtherVal(this.txtNewQty.Text))) { Response.Redirect("InvalidInput.aspx"); } }
private void LenVal() { if ((!PubEntAdminManager.LenVal(this.txtNewPub.Text, 10)) || (!PubEntAdminManager.LenVal(this.txtNewQty.Text, 8))) { Response.Redirect("InvalidInput.aspx"); } }
private void LenVal() { if ((!PubEntAdminManager.LenVal(this.txtKitID.Text, 10)) || (!PubEntAdminManager.LenVal(this.HiddenIsVK.Value, 1)) || (!PubEntAdminManager.LenVal(this.HiddenVal.Value, 1))) { Response.Redirect("InvalidInput.aspx"); } }
protected void ByPassRegisterMonitoredChanges() { PubEntAdminManager.BypassModifiedMethod(this.btnSave, false); PubEntAdminManager.BypassModifiedMethod(this.btnSave2, false); PubEntAdminManager.BypassModifiedMethod(this.btnEdit, false); PubEntAdminManager.BypassModifiedMethod(this.btnEdit2, false); PubEntAdminManager.BypassModifiedMethod(this.SpellCkr1.LangSel(), false); PubEntAdminManager.BypassModifiedMethod(this.SpellCkr2.LangSel(), false); }
protected void btQuery_Click(object sender, EventArgs e) { KwGridView.Visible = false; ButtonExcel_Click.Visible = false; Label8.Visible = false; /****EAC BAD CODE int Singlequote=0;*/ Message.Visible = false; string[] split = null; string iProdId = null; string delimStr = ","; char[] delimiter = delimStr.ToCharArray(); Boolean valid = false; Boolean validnum = false; Boolean validlen = false; iProdId = TxtPubid.Text; if (iProdId.Length != 0) { valid = PubEntAdminManager.OtherVal(iProdId); validnum = PubEntAdminManager.SpecialVal2(iProdId); validlen = PubEntAdminManager.LenVal(iProdId, 50); /****EAC BAD CODE Singlequote = iProdId.IndexOf(",");*/ } if ((valid == false) && (validnum == false) && (validlen == true) /****EAC BAD CODE & Singlequote==0*/) { split = iProdId.Split(delimiter); ArrayList list = strQuery(split); if (iProdId == "") { Message.Visible = true; } else if (list.Count == 0) { ButtonExcel_Click.Visible = false; Label8.Visible = false; Message.Text = "Invalid Publication ID(s)"; Message.Visible = true; } else { KwGridView.DataSource = list; KwGridView.DataBind(); KwGridView.Visible = true; Label8.Visible = true; ButtonExcel_Click.Visible = true; } } else { Response.Redirect("InvalidInput.aspx"); } }
protected string CleanSearchTerms(string s) { Regex r = new Regex(@"\s+"); string l_key = r.Replace(s, " "); l_key = PubEntAdminManager.Clean(l_key); l_key = PubEntAdminManager.StripOutNoise(l_key); return(l_key); }
private void TypeVal() { if (this.txtNewQty.Text.Trim().Length > 0) { if (!PubEntAdminManager.ContentNumVal(this.txtNewQty.Text.Trim())) { Response.Redirect("InvalidInput.aspx"); } } }
protected void RejectCrossPagePostBack() { if (PubEntAdminManager.TamperProof) { PubEntAdminManager.RedirectEncodedURLWithQS(ParentPage, PubEntAdminManager.strVK_LPType + "=" + (this.IsVK ? PubEntAdminManager.strVKType : PubEntAdminManager.strLPType)); } else { Response.Redirect(ParentPage + "?" + PubEntAdminManager.strVK_LPType + "=" + (this.IsVK ? PubEntAdminManager.strVKType : PubEntAdminManager.strLPType)); } }
protected void btnAddNew_Click(object sender, EventArgs e) { if (PubEntAdminManager.TamperProof) { PubEntAdminManager.RedirectEncodedURLWithQS(ParentPage, PubEntAdminManager.strVK_LPType + "=" + (this.IsVK ? PubEntAdminManager.strVKType : PubEntAdminManager.strLPType)); } else { Response.Redirect(ParentPage + "?" + PubEntAdminManager.strVK_LPType + "=" + (this.IsVK ? PubEntAdminManager.strVKType : PubEntAdminManager.strLPType)); } }
protected void ImgBtnExportSchRsltToExcel_OnClick(object sender, ImageClickEventArgs e) { this.gvResult.AllowSorting = false; this.Export = true; string ret = ""; foreach (DataGridItem c in this.gvResult.Items) { if (c.ItemType == ListItemType.Item || c.ItemType == ListItemType.AlternatingItem) { CheckBox cb = ((CheckBox)c.Cells[7].FindControl("chkSelect")); if (cb.Checked) { if (ret.Length > 0) { ret += ","; } ret += c.Cells[0].Text; } } } if (this.SortExpression == PubEntAdminManager.strDefaultoSearchSorting) { if (ret.Length == 0) { this.BindData_(((PubEntAdmin.BLL.Search)Session[PubEntAdminManager.strSearchCriteria]).PUBIDs); } else { this.BindData_(ret); } } else { if (ret.Length == 0) { this.BindData(((PubEntAdmin.BLL.Search)Session[PubEntAdminManager.strSearchCriteria]).PUBIDs); } else { this.BindData(ret); } } this.gvResult.Columns[7].Visible = false; this.Export = false; ExportRoutines.ExportToExcel(this.Page, PubEntAdminManager.AdminSearchRptName(), PubEntAdminManager.DefAdminSearchResultRptTitle, this.gvResult); }
protected void Page_Load(object sender, EventArgs e) { if (Session.IsNewSession) { Response.Redirect("Home.aspx"); } userControl = (System.Web.UI.UserControl) this.LoadControl("UserControl/AdminMenu.ascx"); this.plcHldMenu.Controls.Add(userControl); if (!IsPostBack) { ///Uncomment below code after integrated with Admin Tool if (!((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole)) { PubEntAdminManager.UnathorizedAccess(); } this.PageTitle = "Canned Search Setup"; } //Code for Hailstorm if (ucCancerTypeAdd != null) { ucCancerTypeAdd.SecurityCheck(); } if (ucSubjectAdd != null) { ucCancerTypeAdd.SecurityCheck(); } if (ucPubFormatAdd != null) { ucCancerTypeAdd.SecurityCheck(); } if (ucRaceAdd != null) { ucCancerTypeAdd.SecurityCheck(); } if (ucAudienceAdd != null) { ucCancerTypeAdd.SecurityCheck(); } if (ucLanguageAdd != null) { ucCancerTypeAdd.SecurityCheck(); } if (ucCollectionsAdd != null) { ucCancerTypeAdd.SecurityCheck(); } //End of code for Hailstorm }
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"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (Session.IsNewSession) { Response.Redirect("Home.aspx"); } this.Title = "Featured Stacks History Report"; this.PageTitle = "Featured Stacks History Report"; //this.PageTitle = "Featured Publications Setup"; //this.AddJS(Server.MapPath("JS/LUMgmt.js")); if (!((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole)) { PubEntAdminManager.UnathorizedAccess(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session.IsNewSession) { Response.Redirect("Home.aspx"); } this.Title = "Featured Stacks Access Report"; this.PageTitle = "Featured Stacks Access Report"; if (!((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole)) { PubEntAdminManager.UnathorizedAccess(); } //this.BindGrid(); }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtKitID.Text)) || (PubEntAdminManager.OtherVal(this.HiddenIsVK.Value)) || (PubEntAdminManager.OtherVal(this.HiddenVal.Value))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.lstboxKitPubInt.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session.IsNewSession) { Response.Redirect("~/Home.aspx"); } System.Web.UI.UserControl userControl = (System.Web.UI.UserControl) this.LoadControl("~/UserControl/AdminMenu.ascx"); this.plcHldMenu.Controls.Add(userControl); this.PageTitle = "Held Order Report"; if (!IsPostBack) { _startdt = _enddt = ""; if (!((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole)) { PubEntAdminManager.UnathorizedAccess(); } } }
private void SpecialVal() { if ((PubEntAdminManager.SpecialVal2(this.txtKitID.Text.Replace(" ", ""))) || (PubEntAdminManager.SpecialVal2(this.HiddenIsVK.Value.Replace(" ", ""))) || (PubEntAdminManager.SpecialVal2(this.HiddenVal.Value.Replace(" ", "")))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in lstboxKitPubInt.Items) { if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) || PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", ""))) { 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); } }
private void TagVal() { if (txtConfName.Text.Length > 0) { if (PubEntAdminManager.OtherVal(this.txtConfName.Text)) { Response.Redirect("InvalidInput.aspx"); } } if (txtRotateTime.Text.Length > 0 || txtPageTime.Text.Length > 0 || txtSessionTime.Text.Length > 0) { if (PubEntAdminManager.OtherVal(this.txtRotateTime.Text) && PubEntAdminManager.OtherVal(this.txtPageTime.Text) && PubEntAdminManager.OtherVal(this.txtSessionTime.Text)) { Response.Redirect("InvalidInput.aspx"); } } }
private void SpecialVal() { if (txtConfName.Text.Length > 0) { if (PubEntAdminManager.SpecialVal2(this.txtConfName.Text.Replace(" ", ""))) { Response.Redirect("InvalidInput.aspx"); } } if (txtRotateTime.Text.Length > 0 || txtPageTime.Text.Length > 0 || txtSessionTime.Text.Length > 0) { if (PubEntAdminManager.SpecialVal2(this.txtRotateTime.Text.Replace(" ", "")) && PubEntAdminManager.SpecialVal2(this.txtPageTime.Text.Replace(" ", "")) && PubEntAdminManager.SpecialVal2(this.txtSessionTime.Text.Replace(" ", ""))) { Response.Redirect("InvalidInput.aspx"); } } }