示例#1
0
 private void SpecialVal()
 {
     if ((PubEntAdminManager.SpecialVal2(this.txtLngName.Text.Replace(" ", ""))))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#2
0
 protected void RegisterCharCountDown()
 {
     PubEntAdminManager.RegisterCharCountDown(this.txtShortTitle, this.txtShortTitle.MaxLength);
     PubEntAdminManager.RegisterCharCountDown(this.txtLongTitle, this.txtLongTitle.MaxLength);
     PubEntAdminManager.RegisterCharCountDown(this.txtSpanishAccentLongTitle, this.txtSpanishAccentLongTitle.MaxLength);
     PubEntAdminManager.RegisterCharCountDown(this.txtSpanishNoAccentLongTitle, this.txtSpanishNoAccentLongTitle.MaxLength);
 }
示例#3
0
        private void SpecialVal()
        {
            foreach (ListItem li in ddlCat.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }

            foreach (ListItem li in ddlValue.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }

            foreach (DataGridItem c in this.gvResult.Items)
            {
                if (c.ItemType == ListItemType.Item || c.ItemType == ListItemType.AlternatingItem)
                {
                    if (PubEntAdminManager.SpecialVal2(c.Cells[0].Text.Replace(" ", "")) ||
                        PubEntAdminManager.SpecialVal2(((TextBox)c.Cells[2].FindControl("txtSeq")).Text.Replace(" ", "")))
                    {
                        Response.Redirect("InvalidInput.aspx");
                    }
                }
            }
        }
示例#4
0
 private void LenVal()
 {
     if ((!PubEntAdminManager.LenVal(this.txtSubcatDes.Text, 100)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#5
0
        protected void gvResult_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            if (e.CommandSource is Button)
            {
                if (e.CommandName == "Delete")
                {
                    int Id  = (int)gvResult.DataKeys[e.Item.ItemIndex];
                    int cnt = PE_DAL.DeleteVK_LP(Id, e.Item.Cells[2].Text, System.Convert.ToInt32(this.IsVK));
                    BindDataVK_LP(this.IsVK);
                }
                else if (e.CommandName == "edit")
                {
                    int    Id         = (int)gvResult.DataKeys[e.Item.ItemIndex];
                    string interface_ = e.Item.Cells[2].Text;

                    if (PubEntAdminManager.TamperProof)
                    {
                        PubEntAdminManager.RedirectEncodedURLWithQS(ChildPage,
                                                                    PubEntAdminManager.strPubID + "=" + Id.ToString() + "&" +
                                                                    PubEntAdminManager.strInterface + "=" + this.WhatInt(interface_) +
                                                                    "&" + PubEntAdminManager.strVK_LPType + "=" + (this.blnIsVK ? PubEntAdminManager.strVKType : PubEntAdminManager.strLPType));
                    }
                    else
                    {
                        Response.Redirect(ChildPage + "?" + PubEntAdminManager.strPubID + "=" + Id.ToString() + "&" +
                                          PubEntAdminManager.strInterface + "=" + this.WhatInt(interface_) +
                                          "&" + PubEntAdminManager.strVK_LPType + "=" + (this.blnIsVK ? PubEntAdminManager.strVKType : PubEntAdminManager.strLPType), true);
                    }
                }
            }
        }
示例#6
0
 private void SpecialVal()
 {
     if ((PubEntAdminManager.SpecialVal2(this.txtfilAttach.Value.Replace(" ", ""))))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#7
0
 private void TagVal()
 {
     if ((PubEntAdminManager.OtherVal(this.txtLngName.Text)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
 private void LenVal()
 {
     if ((!PubEntAdminManager.LenVal(this.txtMaxQtyROO.Text, 8)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
        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");
                }
            }
        }
示例#10
0
        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");
                }
            }
        }
示例#11
0
        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");
            }
        }
示例#12
0
 private void TagVal()
 {
     if ((PubEntAdminManager.OtherVal(this.txtfilAttach.Value)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#13
0
        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();
            }
        }
示例#14
0
 private void LenVal()
 {
     if ((!PubEntAdminManager.LenVal(this.txtTranslation.Text, 10)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#15
0
 private void LenVal()
 {
     if ((!PubEntAdminManager.LenVal(this.txtLngName.Text, 50)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#16
0
        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");
                }
            }
        }
示例#17
0
 private void TagVal()
 {
     if ((PubEntAdminManager.OtherVal(this.txtAnnouncementName.Text)) ||
         (PubEntAdminManager.OtherVal(this.txtAnouncementURL.Text)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#18
0
 private void LenVal()
 {
     if ((!PubEntAdminManager.LenVal(this.txtAnnouncementName.Text, 500)) ||
         (!PubEntAdminManager.LenVal(this.txtAnouncementURL.Text, 500)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#19
0
 protected void RegisterMonitoredChanges()
 {
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.ckboxListDisplayStatusExh);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.txtMaxQtyExh);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.txtMaxQtyIntl);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoEveryOrder);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoShowInSearchRes);
 }
示例#20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.PubID > 0)
            {
                this.BindData();
            }

            PubEntAdminManager.AssignMonitorTabChangeValuesOnPageLoadInReadMode(this.Page);
        }
示例#21
0
        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");
            }
        }
示例#22
0
 private void TypeVal()
 {
     if (this.txtMaxQtyROO.Text.Trim().Length > 0)
     {
         if (!PubEntAdminManager.ContentNumVal(this.txtMaxQtyROO.Text.Trim()))
         {
             Response.Redirect("InvalidInput.aspx");
         }
     }
 }
示例#23
0
 private void TypeVal()
 {
     if (this.txtRelated.Text.Trim().Length > 0)
     {
         if (!PubEntAdminManager.ContentVal(this.txtRelated.Text.Trim(), @"^[a-zA-Z0-9]{1,10}$"))
         {
             Response.Redirect("InvalidInput.aspx");
         }
     }
 }
示例#24
0
 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");
         }
     }
 }
示例#25
0
 public void SecurityCheck()
 {
     foreach (ListItem li in LookUpList.Items)
     {
         //if (PubEntAdminManager.OtherVal(li.Text) || PubEntAdminManager.OtherVal(li.Value))
         if (!PubEntAdminManager.ContentNumVal(li.Value))
         {
             Response.Redirect("InvalidInput.aspx");
         }
     }
 }
示例#26
0
 private void LenVal()
 {
     if ((!PubEntAdminManager.LenVal(this.txtKeyword.Text, 400)) ||
         (!PubEntAdminManager.LenVal(this.txtNIHNum1.Text, 2)) ||
         (!PubEntAdminManager.LenVal(this.txtNIHNum2.Text, 5)) ||
         (!PubEntAdminManager.LenVal(this.txtSrRecordStartDate.Text, 10)) ||
         (!PubEntAdminManager.LenVal(this.txtEnRecordEndDate.Text, 10)))
     {
         Response.Redirect("InvalidInput.aspx");
     }
 }
示例#27
0
 private void SpecialVal()
 {
     foreach (ListItem li in ((DropDownList)CategoryStep.ContentTemplateContainer.
                              FindControl("ddlCategory")).Items)
     {
         if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
             PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
         {
             Response.Redirect("InvalidInput.aspx");
         }
     }
 }
示例#28
0
//        protected void Page_PreRender(object sender, System.EventArgs e)
//        {
//            #region ClientScript
//             ScriptManager.RegisterStartupScript(this,
//                typeof(NCIPLTabEditInfo), "NCIPLTabEditInfo_ClientScript",
//            @"
//
//                    function copyfeaturedimage() {
//                        document.getElementById('<%=this.fakeFeaturedinput.ClientID %>').value =
//                         document.getElementById('<%=this.realFeaturedinput.ClientID %>').value;
//                  }
//
//            ", true);
//            #endregion

//        }

        #region MonitorChanges
        protected void RegisterMonitoredChanges()
        {
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.ckboxListDisplayStatusNCIPL);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.txtMaxQtyNCIPL);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.txtMaxQtyIntl);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoEveryOrder);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoShowInSearchRes);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoFeatured);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.listSubject);
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.listStacks);      //CR-36
            PubEntAdminManager.MonitorChanges2(this.Page, this, this.listCollections); //NCIPL_CC
        }
示例#29
0
        private void SpecialVal()
        {
            if ((PubEntAdminManager.SpecialVal2(this.txtMaxQtyNCIPL.Text.Replace(" ", ""))) ||
                (PubEntAdminManager.SpecialVal2(this.txtMaxQtyIntl.Text.Replace(" ", ""))))
            {
                Response.Redirect("InvalidInput.aspx");
            }

            foreach (ListItem li in ckboxListDisplayStatusNCIPL.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }

            foreach (ListItem li in rdbtnListYesNoEveryOrder.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }

            foreach (ListItem li in rdbtnListYesNoShowInSearchRes.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }

            foreach (ListItem li in rdbtnListYesNoFeatured.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }

            foreach (ListItem li in rdbtnListYesNoFeatured.Items)
            {
                if (PubEntAdminManager.SpecialVal2(li.Text.Replace(" ", "")) ||
                    PubEntAdminManager.SpecialVal2(li.Value.Replace(" ", "")))
                {
                    Response.Redirect("InvalidInput.aspx");
                }
            }
        }
示例#30
0
 protected void RegisterMonitoredChanges()
 {
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.ckboxListDisplayStatusROO);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.txtMaxQtyROO);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoEveryOrder);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoShowInSearchRes);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoROOKit);
     //NCIPLCC PubEntAdminManager.MonitorChanges2(this.Page, this, this.rdbtnListYesNoMostCommonList);
     //NCIPLCC PubEntAdminManager.MonitorChanges2(this.Page, this, this.listMCLSubject);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.listSubject);
     PubEntAdminManager.MonitorChanges2(this.Page, this, this.listCollections); //NCIPL_CC
 }