protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { int Id = (int)gvResult.DataKeys[e.Item.ItemIndex]; LiveIntSel l_LiveIntSel = ((LiveIntSel)((System.Web.UI.WebControls.TableRow)(e.Item)). Cells[3].FindControl("LiveIntSel2")); ///----------------------------------------------- if (!PubEntAdminManager.LenVal(((TextBox)((System.Web.UI.WebControls.TableRow)(e.Item)). Cells[2].FindControl("txtSubjName")).Text.Trim(), 50)) { Response.Redirect("InvalidInput.aspx"); } if (PubEntAdminManager.OtherVal(((TextBox)((System.Web.UI.WebControls.TableRow)(e.Item)). Cells[2].FindControl("txtSubjName")).Text.Trim())) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in l_LiveIntSel.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } if (PubEntAdminManager.SpecialVal2(((TextBox)((System.Web.UI.WebControls.TableRow)(e.Item)). Cells[2].FindControl("txtSubjName")).Text.Replace(" ", ""))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in l_LiveIntSel.Items) { if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) || PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", ""))) { Response.Redirect("InvalidInput.aspx"); } } ///----------------------------------------------- bool blnSubjSave = PE_DAL.SetSubject(ref Id, ((TextBox)((System.Web.UI.WebControls.TableRow)(e.Item)).Cells[2].FindControl("txtSubjName")).Text.Trim(), System.Convert.ToInt32(l_LiveIntSel.InNCIPL), System.Convert.ToInt32(l_LiveIntSel.InROO), System.Convert.ToInt32(l_LiveIntSel.InExh), System.Convert.ToInt32(l_LiveIntSel.InCatalog), System.Convert.ToInt32(((CheckBox)((System.Web.UI.WebControls.TableRow)(e.Item)).Cells[4].FindControl("ckboxHasSubCat")).Checked)); if (blnSubjSave) { this.gvResult.EditItemIndex = -1; Session.Remove("SubjectEditItemIndex"); this.BindData(); } }
private void TagVal() { foreach (ListItem li in this.listCategory.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listSubCategory.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listSubSubCategory.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in ListSubject.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
protected void btnAdd_Click(object sender, EventArgs e) { Message.Visible = false; if ((this.txtAwdYear.Text == string.Empty) || (this.txtAwdYear.Text == null)) { string confirm = "Award Year cannot be empty."; Message.Text = confirm; Message.Visible = true; } else if (txtAwdName.Text == string.Empty || this.txtAwdName.Text == null) { string confirm = "Cannot add empty Lookup Value."; Message.Text = confirm; Message.Visible = true; } else { string awddesc = ""; if (this.txtAwdCategory.Text == string.Empty && this.txtAwdName.Text == string.Empty) { awddesc = this.txtAwdYear.Text.Trim(); } else if (this.txtAwdCategory.Text == string.Empty) { awddesc = this.txtAwdName.Text.Trim() + ", " + this.txtAwdYear.Text.Trim(); } else if (this.txtAwdName.Text == string.Empty) { awddesc = this.txtAwdCategory.Text.Trim() + " , " + this.txtAwdYear.Text.Trim(); } else { awddesc = this.txtAwdName.Text.Trim() + ", " + this.txtAwdCategory.Text.Trim() + " , " + this.txtAwdYear.Text.Trim(); } Boolean valid = false; Boolean validnum = false; Boolean validlen = false; if (awddesc.Length != 0) { valid = PubEntAdminManager.OtherVal(awddesc); validnum = PubEntAdminManager.SpecialVal2(awddesc); validlen = PubEntAdminManager.LenVal(awddesc, 150); } if ((valid == false) && (validnum == false) && (validlen == true)) { AddLookup(awddesc, txtAwdName.Text, txtAwdCategory.Text, txtAwdYear.Text); } else { Response.Redirect("InvalidInput.aspx"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtLngName.Text))) { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtfilAttach.Value))) { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { foreach (ListItem li in this.ddlCat.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in ddlValue.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (DataGridItem c in this.gvResult.Items) { if (c.ItemType == ListItemType.Item || c.ItemType == ListItemType.AlternatingItem) { if (PubEntAdminManager.OtherVal(c.Cells[0].Text) || PubEntAdminManager.OtherVal(((TextBox)c.Cells[2].FindControl("txtSeq")).Text)) { Response.Redirect("InvalidInput.aspx"); } } } }
protected void btnAdd_Click(object sender, EventArgs e) { Message.Visible = false; string sredesc = this.txtSreName.Text.Trim(); Boolean valid = false; Boolean validnum = false; Boolean validlen = false; if (sredesc.Length != 0) { valid = PubEntAdminManager.OtherVal(sredesc); validnum = PubEntAdminManager.SpecialVal2(sredesc); validlen = PubEntAdminManager.LenVal(sredesc, 50); } if ((valid == false) && (validnum == false) && (validlen == true)) { //NCIPL_CC - Added check if (!LiveIntSel1.SelectedAny) { string confirm = "At least one Live Interface should be selected."; Message.Text = confirm; Message.Visible = true; return; } AddLookup(sredesc); } else { Response.Redirect("InvalidInput.aspx"); } }
protected void btnAdd_Click(object sender, EventArgs e) { bool blnIsempty = false; this.lblErFname.Text = ""; this.lblErLname.Text = ""; if (this.txtFName.Text == string.Empty) { string confirm = "Please enter required value."; this.lblErFname.Text = confirm; blnIsempty = true; } if (this.txtLName.Text == string.Empty) { string confirm = "Please enter required value."; this.lblErLname.Text = confirm; blnIsempty = true; } bool valid = false; //bool validnum = false; bool validlen = false; if (txtFName.Text.Length != 0) { string fname = txtFName.Text; valid = PubEntAdminManager.OtherVal(fname); validlen = PubEntAdminManager.LenVal(fname, 20); } if (txtLName.Text.Length != 0) { string lname = txtLName.Text; valid = PubEntAdminManager.OtherVal(lname); validlen = PubEntAdminManager.LenVal(lname, 20); } if (this.txtMInit.Text.Length != 0) { string minitial = txtMInit.Text; valid = PubEntAdminManager.OtherVal(minitial); validlen = PubEntAdminManager.LenVal(minitial, 1); } if (!blnIsempty) { if ((valid == false) && (validlen == true)) { AddLookup(); } else { Response.Redirect("InvalidInput.aspx"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtAnnouncementName.Text)) || (PubEntAdminManager.OtherVal(this.txtAnouncementURL.Text))) { Response.Redirect("InvalidInput.aspx"); } }
protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { OwnerCollection dt = ((OwnerCollection)this.gvResult.DataSource); PubEntAdmin.BLL.Owner l_owner = dt[e.Item.DataSetIndex]; int OwnerID = l_owner.OwnerID; string lname = ((TextBox)e.Item.Cells[1].Controls[1]).Text.Trim(); string fname = ((TextBox)e.Item.Cells[2].Controls[1]).Text.Trim(); string minitial = ((TextBox)e.Item.Cells[3].Controls[1]).Text; bool valid = false; bool validlen = false; if (lname.Length != 0) { valid = PubEntAdminManager.OtherVal(lname); validlen = PubEntAdminManager.LenVal(lname, 20); } if (fname.Length != 0) { valid = PubEntAdminManager.OtherVal(fname); validlen = PubEntAdminManager.LenVal(fname, 20); } if (minitial.Length != 0) { valid = PubEntAdminManager.OtherVal(minitial); validlen = PubEntAdminManager.LenVal(minitial, 1); minitial = minitial.Trim(); } if ((valid == false) && (validlen == true)) { OwnerCollection coll = LU_DAL.GetOwnerByFullname(fname, lname, minitial); if (coll.Count > 0) { string confirm = "The Owner already existed."; ((Label)e.Item.Cells[8].Controls[1]).Text = confirm; } else { LU_DAL.UpdateOwnerLU(OwnerID, fname, lname, minitial); this.gvResult.EditItemIndex = -1; //this.BindDataAferUpdate(); this.BindData(); } } else { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { foreach (ListItem li in ((DropDownList)CategoryStep.ContentTemplateContainer. FindControl("ddlCategory")).Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { Page.Validate(); if (Page.IsValid) { Boolean validName = false; Boolean validnumName = false; Boolean validlenName = false; Boolean validIRL = false; Boolean validnumURL = false; Boolean validlenURL = false; int announcmentid = System.Convert.ToInt32(e.Item.Cells[0].Text); string Name = ((TextBox)e.Item.Cells[1].FindControl("txtAnnouncementName_gd")).Text; string URL = ((TextBox)e.Item.Cells[2].FindControl("txtAnnouncementURL_gd")).Text; string Start = ((TextBox)e.Item.Cells[3].FindControl("txtStartDate_gd")).Text; string End = ((TextBox)e.Item.Cells[4].FindControl("txtEndDate_gd")).Text; if (Name.Length != 0) { validlenName = PubEntAdminManager.LenVal(Name, 5); validName = PubEntAdminManager.OtherVal(Name); validnumName = PubEntAdminManager.SpecialVal2(Name.Replace(" ", "")); } if (URL.Length != 0) { validlenURL = PubEntAdminManager.LenVal(URL, 500); validIRL = PubEntAdminManager.OtherVal(URL); validnumURL = PubEntAdminManager.SpecialVal2(URL.Replace(" ", "")); } if ((validName == false) && (validnumName == false) && (validlenName == true) && (validlenURL == false) && (validIRL == false) && (validnumURL == true)) { bool ret = PE_DAL.SetAnnouncement(ref announcmentid, Name, URL, System.Convert.ToDateTime(Start), System.Convert.ToDateTime(End), 1); if (ret) { this.gvResult.EditItemIndex = -1; Session.Remove("AnnouncementEditItemIndex"); this.BindData(); } } else { Response.Redirect("InvalidInput.aspx"); } } }
protected void btnAdd_Click(object sender, EventArgs e) { bool blnIsempty = false; lblErLongDesc.Text = ""; lblErSpCode.Text = ""; if (this.txtSpLongDesc.Text == string.Empty) { string confirm = "Please enter required value."; this.lblErLongDesc.Text = confirm; blnIsempty = true; } if (this.txtSpCode.Text == string.Empty) { string confirm = "Please enter required value."; this.lblErSpCode.Text = confirm; blnIsempty = true; } bool valid = false; //bool validnum = false; bool validlen = false; if (txtSpLongDesc.Text.Length != 0) { string longdesc = txtSpLongDesc.Text; valid = PubEntAdminManager.OtherVal(longdesc); validlen = PubEntAdminManager.LenVal(longdesc, 101); } if (txtSpCode.Text.Length != 0) { string code = txtSpCode.Text; valid = PubEntAdminManager.OtherVal(code); validlen = PubEntAdminManager.LenVal(code, 7); } if (!blnIsempty) { if ((valid == false) && (validlen == true)) { AddLookup(sender); } else { Response.Redirect("InvalidInput.aspx"); } } }
protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { SponsorCollection dt = ((SponsorCollection)this.gvResult.DataSource); PubEntAdmin.BLL.Sponsor l_spon = dt[e.Item.DataSetIndex]; int Sponid = l_spon.SponsorID; //string SpDesc12 = ((TextBox)e.Item.Cells[1].Controls[1]).Text; string SpCode = ((TextBox)e.Item.Cells[1].Controls[1]).Text; string SpLongDesc = ((TextBox)e.Item.Cells[2].Controls[1]).Text; bool valid = false; bool validlen = false; if (SpLongDesc.Length != 0) { string longdesc = txtSpLongDesc.Text; valid = PubEntAdminManager.OtherVal(longdesc); validlen = PubEntAdminManager.LenVal(longdesc, 101); } if (SpCode.Length != 0) { string code = txtSpCode.Text; valid = PubEntAdminManager.OtherVal(code); validlen = PubEntAdminManager.LenVal(code, 7); } if ((valid == false) && (validlen == true)) { SponsorCollection coll = LU_DAL.GetSponsorsbyDesc(SpLongDesc); if (coll.Count > 0) { string confirm = "The Sponsor already existed."; ((Label)e.Item.Cells[7].Controls[1]).Text = confirm; } else { LU_DAL.UpdateSponsorLU(Sponid, SpCode, SpLongDesc, 1); this.gvResult.EditItemIndex = -1; this.BindData(); } } else { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtSubcatDes.Text))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.ddlCategory.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtSubjName.Text))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.LiveIntSelSubj.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { LanguageCollection dt = ((LanguageCollection)this.gvResult.DataSource); PubEntAdmin.BLL.Language l_conf = dt[e.Item.ItemIndex]; int Lngid = l_conf.LngID; string Lngname = ((TextBox)e.Item.Cells[1].Controls[1]).Text; int Active = 0; string sActive = ((Label)e.Item.Cells[2].Controls[1]).Text; if (sActive == "Active") { Active = 1; } else { Active = 0; } Boolean valid = false; Boolean validnum = false; Boolean validlen = false; if (Lngname.Length != 0) { valid = PubEntAdminManager.OtherVal(Lngname); validnum = PubEntAdminManager.SpecialVal2(Lngname); validlen = PubEntAdminManager.LenVal(Lngname, 50); } if ((valid == false) && (validnum == false) && (validlen == true)) { LU_DAL.UpdateLanguageLU(Lngid, Lngname, Active); Response.Redirect("~/LookupMgmt.aspx?sub=language"); } else { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtCPJNum.Text)) || (PubEntAdminManager.OtherVal(this.txtShortTitle.Text)) || (PubEntAdminManager.OtherVal(this.txtLongTitle.Text)) || (PubEntAdminManager.OtherVal(this.txtFS.Text)) || (PubEntAdminManager.OtherVal(this.txtSpanishAccentLongTitle.Text)) || (PubEntAdminManager.OtherVal(this.txtSpanishNoAccentLongTitle.Text)) || (PubEntAdminManager.OtherVal(this.txtURL.Text)) || (PubEntAdminManager.OtherVal(this.txtNerdoURL.Text))) { Response.Redirect("InvalidInput.aspx"); } if (this.txtMaxQtyTile.Visible && this.txtWeight.Visible) { if ((PubEntAdminManager.OtherVal(this.txtMaxQtyTile.Text.Trim())) || (PubEntAdminManager.OtherVal(this.txtWeight.Text.Trim()))) { Response.Redirect("InvalidInput.aspx"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtMaxQtyExh.Text))) { Response.Redirect("InvalidInput.aspx"); } if ((PubEntAdminManager.OtherVal(this.txtMaxQtyIntl.Text))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.ckboxListDisplayStatusExh.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoEveryOrder.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoShowInSearchRes.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
protected void btnAdd_Click(object sender, EventArgs e) { Message.Visible = false; string lngdesc = this.txtLngName.Text.Trim(); Boolean valid = false; Boolean validnum = false; Boolean validlen = false; if (lngdesc.Length != 0) { valid = PubEntAdminManager.OtherVal(lngdesc); validnum = PubEntAdminManager.SpecialVal2(lngdesc); validlen = PubEntAdminManager.LenVal(lngdesc, 50); } if ((valid == false) && (validnum == false) && (validlen == true)) { AddLookup(lngdesc); } else { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.TextCtrl_SpellCkDescription.Text)) || (PubEntAdminManager.OtherVal(this.TextCtrl_SpellCk_Keyword.Text)) || (PubEntAdminManager.OtherVal(this.TextCtrl_SpellCk_Summary.Text)) || (PubEntAdminManager.OtherVal(this.txtTotalPage.Text)) || (PubEntAdminManager.OtherVal(this.TextCtrl_SpellCk_Dimension.Text)) || (PubEntAdminManager.OtherVal(this.TextCtrl_SpellCk_Color.Text)) || (PubEntAdminManager.OtherVal(this.TextCtrl_SpellCk_Other.Text)) || (PubEntAdminManager.OtherVal(this.TextCtrl_SpellCk_POSInst.Text)) || (PubEntAdminManager.OtherVal(this.txtExpDate.Text)) ) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in listCancerType.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listAudience.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listLang.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listProdFormat.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } //Commented - NCIPL_CC //foreach (ListItem li in listSeries.Items) //{ // if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) // { // Response.Redirect("InvalidInput.aspx"); // } //} foreach (ListItem li in listRace.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listReadingLevel.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listAward.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtKeyword.Text)) || (PubEntAdminManager.OtherVal(this.txtNIHNum1.Text)) || (PubEntAdminManager.OtherVal(this.txtNIHNum2.Text)) || (PubEntAdminManager.OtherVal(this.txtSrRecordStartDate.Text)) || (PubEntAdminManager.OtherVal(this.txtEnRecordEndDate.Text))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.LiveIntSelSearch.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listCancerType.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listSubject.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listAudience.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listLang.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listProdFormat.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listSeries.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listRace.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listBookStatus.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listReadingLevel.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } if (PubEntAdminManager.OtherVal(this.chboxMostCommonList.Text)) { Response.Redirect("InvalidInput.aspx"); } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtMaxQtyNCIPL.Text)) || (PubEntAdminManager.OtherVal(this.txtMaxQtyIntl.Text)) || (PubEntAdminManager.OtherVal(this.txtRank.Text))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.ckboxListDisplayStatusNCIPL.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoEveryOrder.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoShowInSearchRes.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoFeatured.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in listSubject.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } //Begin CR-36 foreach (ListItem li in listStacks.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } //End CR-36 //NCIPL_CC foreach (ListItem li in listCollections.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
private void TagVal() { if ((PubEntAdminManager.OtherVal(this.txtMaxQtyROO.Text))) { Response.Redirect("InvalidInput.aspx"); } foreach (ListItem li in this.ckboxListDisplayStatusROO.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoEveryOrder.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } foreach (ListItem li in rdbtnListYesNoShowInSearchRes.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } //NCIPLCC foreach (ListItem li in rdbtnListYesNoMostCommonList.Items) //NCIPLCC { //NCIPLCC if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) //NCIPLCC { //NCIPLCC Response.Redirect("InvalidInput.aspx"); //NCIPLCC } //NCIPLCC } //NCIPLCC foreach (ListItem li in listMCLSubject.Items) //NCIPLCC { //NCIPLCC if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) //NCIPLCC { //NCIPLCC Response.Redirect("InvalidInput.aspx"); //NCIPLCC } //NCIPLCC } foreach (ListItem li in listSubject.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } //NCIPL_CC foreach (ListItem li in listCollections.Items) { if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value)) { Response.Redirect("InvalidInput.aspx"); } } }
protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { AwardCollection dt = ((AwardCollection)this.gvResult.DataSource); PubEntAdmin.BLL.Award l_conf = dt[e.Item.ItemIndex]; int Awdid = l_conf.AwardID; string Awdname = ""; string Awdyear = ""; string Awdcategory = ""; Awdname = ((TextBox)e.Item.Cells[1].Controls[1]).Text; Awdcategory = ((TextBox)e.Item.Cells[1].Controls[3]).Text; Awdyear = ((TextBox)e.Item.Cells[1].Controls[5]).Text; if (Awdyear == "") { string confirm = "Award Year cannot be empty."; ((Label)e.Item.Cells[5].Controls[1]).Text = confirm; } else { int Active = 0; string sActive = ((Label)e.Item.Cells[2].Controls[1]).Text; if (sActive == "Active") { Active = 1; } else { Active = 0; } ((TextBox)e.Item.Cells[1].Controls[1]).Visible = false; Boolean valid = false; Boolean validnum = false; Boolean validlen = true; if (Awdname != null && Awdname.Length != 0) { valid = PubEntAdminManager.OtherVal(Awdname); validnum = PubEntAdminManager.SpecialVal2(Awdname); validlen = PubEntAdminManager.LenVal(Awdname, 50); } if (Awdcategory != null && Awdcategory.Length != 0) { valid = PubEntAdminManager.OtherVal(Awdcategory); validnum = PubEntAdminManager.SpecialVal2(Awdcategory); validlen = PubEntAdminManager.LenVal(Awdcategory, 100); } if (Awdyear != null && Awdyear.Length != 0) { valid = PubEntAdminManager.OtherVal(Awdyear); validnum = PubEntAdminManager.SpecialVal2(Awdyear); validlen = PubEntAdminManager.LenVal(Awdyear, 10); } if ((valid == false) && (validnum == false) && (validlen == true)) { DataSet ds = new DataSet(); ds = LU_DAL.displayAward(); string dbAwdname = ""; string dbAwdCate = ""; string dbAwdYear = ""; Boolean iExist = false; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { DataRow dataRow = ds.Tables[0].Rows[i]; dbAwdname = (string)dataRow["AWARD_NAME"].ToString().Trim(); dbAwdCate = (string)dataRow["AWARD_Category"].ToString().Trim(); dbAwdYear = (string)dataRow["AWARD_YEAR"].ToString().Trim(); if (Awdname.Trim() == dbAwdname && Awdcategory.Trim() == dbAwdCate && Awdyear.Trim() == dbAwdYear) { iExist = true; } } if (iExist) { e.Item.Cells[1].Controls[1].Visible = true; string confirm = " The Lookup value already exists."; ((Label)e.Item.Cells[5].Controls[1]).Text = confirm; } else { LU_DAL.UpdateAwardLU(Awdid, Awdname, Awdyear, Awdcategory, Active); Response.Redirect("~/LookupMgmt.aspx?sub=award"); } } else { Response.Redirect("InvalidInput.aspx"); } } }
protected void gvResult_UpdateCommand(object source, DataGridCommandEventArgs e) { SeriesCollection dt = ((SeriesCollection)this.gvResult.DataSource); PubEntAdmin.BLL.Series l_conf = dt[e.Item.ItemIndex]; int Sreid = l_conf.SreID; string Srename = ((TextBox)e.Item.Cells[1].Controls[1]).Text; int Active = 0; string sActive = ((Label)e.Item.Cells[2].Controls[1]).Text; if (sActive == "Active") { Active = 1; } else { Active = 0; } Boolean valid = false; Boolean validnum = false; Boolean validlen = false; if (Srename.Length != 0) { valid = PubEntAdminManager.OtherVal(Srename); validnum = PubEntAdminManager.SpecialVal2(Srename); validlen = PubEntAdminManager.LenVal(Srename, 50); } if ((valid == false) && (validnum == false) && (validlen == true)) { #region NCIPL_CC_Checks //Added check LiveIntSel LiveIntSel2 = (LiveIntSel)e.Item.Cells[3].Controls[0]; if (!LiveIntSel2.SelectedAny) { Label lblMessage = e.Item.Cells[6].Controls[0] as Label; lblMessage.Text = "At least one Live Interface should be selected."; return; } //Check whether there are associations before removing an Interface if (LiveIntSel2.InNCIPL == false) { bool ValExists = LU_DAL.CheckSeriesInterfaceAssociation(Sreid, "NCIPL"); if (ValExists) { Label lblMessage = e.Item.Cells[6].Controls[0] as Label; //lblMessage.Text = "This Series has associations on the NCIPL tab for one or more publications."; lblMessage.Text = "Unable to Update, value associated with publication(s) on the NCIPL tab."; return; } } if (LiveIntSel2.InROO == false) { bool ValExists = LU_DAL.CheckSeriesInterfaceAssociation(Sreid, "NCIPL_CC"); if (ValExists) { Label lblMessage = e.Item.Cells[6].Controls[0] as Label; //lblMessage.Text = "This Series has associations on the ROO tab for one or more publications."; lblMessage.Text = "Unable to Update, value associated with publication(s) on the NCIPLcc tab."; return; } } #endregion //NCIPL_CC LU_DAL.UpdateSeriesLU(Sreid, Srename, Active); LU_DAL.UpdateSeriesLU(Sreid, Srename, Active, (LiveIntSel2.InNCIPL == true) ? 1 : 0, (LiveIntSel2.InROO == true) ? 1 : 0); Response.Redirect("~/LookupMgmt.aspx?sub=serie"); } else { Response.Redirect("InvalidInput.aspx"); } }