private void TagVal() { if ((PubEntAdminManager.OtherVal(this.TxtPubid.Text))) { Response.Redirect("InvalidInput.aspx"); } }
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"); } }
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"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtNewPub.Text)) || (PubEntAdminManager.OtherVal(this.txtNewQty.Text))) { Response.Redirect("InvalidInput.aspx"); } }
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"); } }
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"); } } }
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"); } } }
//Security Check public void SecurityCheck(int CaseNum, object Ctrl) { switch (CaseNum) { case 1: //Hidden Field HiddenField hidField = (HiddenField)Ctrl; if (!PubEntAdminManager.ContentNumVal(hidField.Value)) { Response.Redirect("InvalidInput.aspx"); } break; case 2: //Dropdown DropDownList ddlField = (DropDownList)Ctrl; foreach (ListItem li in ddlField.Items) { if (!PubEntAdminManager.ContentNumVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } break; case 3: //Textbox TextBox txtField = (TextBox)Ctrl; txtField.Text = txtField.Text.Trim(); if (!PubEntAdminManager.LenVal(txtField.Text, 500)) { Response.Redirect("InvalidInput.aspx"); } if (PubEntAdminManager.OtherVal(txtField.Text)) { Response.Redirect("InvalidInput.aspx"); } if (PubEntAdminManager.SpecialVal2(txtField.Text)) { Response.Redirect("InvalidInput.aspx"); } break; } }