예제 #1
0
 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));
     }
 }
예제 #2
0
 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));
     }
 }
예제 #3
0
        protected void btnGetRcd_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < this.gvResult.Items.Count; i++)
            {
                DataGridItem c = this.gvResult.Items[i];

                if (c.ItemType == ListItemType.Item || c.ItemType == ListItemType.AlternatingItem)
                {
                    CheckBox cb = ((CheckBox)c.Cells[6].FindControl("chkSelect"));
                    if (cb.Checked)
                    {
                        if (PubEntAdminManager.TamperProof)
                        {
                            PubEntAdminManager.RedirectEncodedURLWithQS("PubRecord.aspx", "mode=view&pubid=" + c.Cells[0].Text);
                        }
                        else
                        {
                            Response.Redirect("~/PubRecord.aspx?mode=view&pubid=" + c.Cells[0].Text, true);
                        }
                    }
                }
            }
        }
예제 #4
0
 protected void btnCreate_Click(object sender, EventArgs e)
 {
     if (PubEntAdminManager.TamperProof)
     {
         if (this.IsVK)
         {
             PubEntAdminManager.RedirectEncodedURLWithQS(ChildPage,
                                                         PubEntAdminManager.strProdID + "=" + this.newKitPubID + "&" +
                                                         PubEntAdminManager.strInterface + "=" + this.newInterfaceToString + "&" +
                                                         PubEntAdminManager.strVK_LPType + "=" + PubEntAdminManager.strVKType);
         }
         else
         {
             PubEntAdminManager.RedirectEncodedURLWithQS(ChildPage,
                                                         PubEntAdminManager.strProdID + "=" + this.newKitPubID + "&" +
                                                         PubEntAdminManager.strInterface + "=" + this.newInterfaceToString + "&" +
                                                         PubEntAdminManager.strVK_LPType + "=" + PubEntAdminManager.strLPType);
         }
     }
     else
     {
         if (this.IsVK)
         {
             Response.Redirect(ChildPage + "?" +
                               PubEntAdminManager.strProdID + "=" + this.newKitPubID + "&" +
                               PubEntAdminManager.strInterface + "=" + this.newInterfaceToString + "&" +
                               PubEntAdminManager.strVK_LPType + "=" + PubEntAdminManager.strVKType, true);
         }
         else
         {
             Response.Redirect(ChildPage + "?" +
                               PubEntAdminManager.strProdID + "=" + this.newKitPubID + "&" +
                               PubEntAdminManager.strInterface + "=" + this.newInterfaceToString + "&" +
                               PubEntAdminManager.strVK_LPType + "=" + PubEntAdminManager.strLPType, true);
         }
     }
 }
예제 #5
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (PubEntAdminManager.TamperProof)
            {
                if (PubEntAdminManager.ContainURLQS("subsubcatid"))
                {
                    PubEntAdminManager.RedirectEncodedURLWithQS("LookupMgmt.aspx", "sub=subsubcat");
                }
            }
            else
            {
                if (Request.QueryString["subsubcatid"] != null)
                {
                    Response.Redirect("~/LookupMgmt.aspx?sub=subsubcat");
                }
            }

            if (Session[PubEntAdminManager.JS] != null)
            {
                if (System.Convert.ToBoolean(Session[PubEntAdminManager.JS].ToString()))
                {
                    this.InsertSplChkScript();

                    this.SpellCkr1.RefImgSplChk().Attributes.Add("onclick", "LookupMgmt_SpellCheckClick(1)");
                    this.SpellCkr2.RefImgSplChk().Attributes.Add("onclick", "LookupMgmt_SpellCheckClick(2)");
                }
                else
                {
                    ShowHideSpellChecker(false);
                }
            }
            else
            {
                ShowHideSpellChecker(false);
            }
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session.IsNewSession)//cross-site request forgery
            {
                Response.Redirect("Home.aspx");
            }

            this.AssignValues();
            this.ByPassRegisterMonitoredChanges();
            System.Web.UI.UserControl userControl;
            this.PageTitle = "Publication Record";

            if (Session[PubEntAdminManager.strGlobalMsg] != null)
            {
                this.lblMsg.Text = Session[PubEntAdminManager.strGlobalMsg].ToString();
            }

            if (!Page.IsPostBack)
            {
                Session.Remove(PubEntAdminManager.strPubGlobalMode);
                //Session.Remove(PubEntAdminManager.strTabContentCurrActTabIndex);
                Session.Remove(PubEntAdminManager.strGlobalMsg);
                Session.Remove(PubEntAdminManager.strReloadPubHist);
                Session.Remove(PubEntAdminManager.strReloadRelatedPub);
                Session.Remove(PubEntAdminManager.strReloadRelatedTranslation);

                if (this.Mode == PubEntAdminManager.strPubGlobalAMode)//add
                {
                    if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                    {
                        Session[PubEntAdminManager.strPubGlobalMode] = PubEntAdminManager.strPubGlobalAMode;
                        this.hplnkBakSechRes.Visible  = this.hplnkRefSech.Visible = false;
                        this.hplnkBakSechRes2.Visible = this.hplnkRefSech2.Visible = false;
                        this.btnEdit.Visible          = this.btnEdit2.Visible = false;
                        this.btnSave.Visible          = this.SpellCkr1.Visible = true;
                        this.btnSave2.Visible         = this.SpellCkr2.Visible = true;
                        this.btnCancel.Visible        = this.btnCancel2.Visible = false;
                        this.lblPageTitle.Text        = "Add New Publication";

                        userControl =
                            (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataE.ascx");
                        ((GenDataE)userControl).Mode = this.Mode;
                        userControl.ID = "GenDataEInfo1";
                        this.plcHldGenData.Controls.Add(userControl);

                        userControl =
                            (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingE.ascx");
                        userControl.ID = "GenProjSettingEInfo1";
                        ((GenProjSettingE)userControl).Mode = this.Mode;
                        this.plcHldGenProjSetting.Controls.Add(userControl);

                        this.trLiveInterfaces.Disabled = false;
                    }
                    else
                    {
                        if (PubEntAdminManager.TamperProof)
                        {
                            PubEntAdminManager.RedirectEncodedURLWithQS("UnauthorizedAccess.aspx",
                                                                        PubEntAdminManager.strUnauthorizedDetail + "=Try to access pub record in Add mode");
                        }
                        else
                        {
                            Response.Redirect("UnauthorizedAccess.aspx?" +
                                              PubEntAdminManager.strUnauthorizedDetail + "=Try to access pub record in Add mode", true);
                        }
                    }
                }
                else if (this.Mode == PubEntAdminManager.strPubGlobalEMode)//edit
                {
                    if (this.PubID > 0)
                    {
                        Session[PubEntAdminManager.strPubGlobalMode] = PubEntAdminManager.strPubGlobalEMode;

                        this.btnEdit.Visible = this.btnEdit2.Visible = false;

                        //if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        //{
                        this.btnSave.Visible   = this.SpellCkr1.Visible = true;
                        this.btnSave2.Visible  = this.SpellCkr2.Visible = true;
                        this.btnCancel.Visible = this.btnCancel2.Visible = true;
                        //}
                        //else
                        //{
                        //    this.btnSave.Visible = this.SpellCkr1.Visible = false;
                        //    this.btnSave2.Visible = this.SpellCkr2.Visible = false;
                        //    this.btnCancel.Visible = this.btnCancel2.Visible = false;
                        //}
                        //authenticate user
                        this.lblPageTitle.Text = "Edit Publication";

                        if (PubEntAdminManager.TamperProof)
                        {
                            myUrlBuilder.PageName = "Home.aspx";
                            myUrlBuilder.Query    = "action=refine";

                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            myUrlBuilder.PageName = "SearchResult.aspx";
                            myUrlBuilder.Query    = "action=sechres";

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }
                        else
                        {
                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = "~/Home.aspx?action=refine";
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = "~/SearchResult.aspx?action=sechres";
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }

                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataE.ascx");
                            ((GenDataE)userControl).ID    = "GenDataEInfo1";
                            ((GenDataE)userControl).Mode  = this.Mode;
                            ((GenDataE)userControl).PubID = this.PubID;
                        }
                        else
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataV.ascx");
                            ((GenDataV)userControl).ID    = "GenDataVInfo1";
                            ((GenDataV)userControl).PubID = this.PubID;
                        }

                        this.plcHldGenData.Controls.Add(userControl);

                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingE.ascx");
                            ((GenProjSettingE)userControl).ID    = "GenProjSettingEInfo1";
                            ((GenProjSettingE)userControl).Mode  = this.Mode;
                            ((GenProjSettingE)userControl).PubID = this.PubID;
                        }
                        else
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingV.ascx");
                            ((GenProjSettingV)userControl).ID    = "GenProjSettingVInfo1";
                            ((GenProjSettingV)userControl).PubID = this.PubID;
                        }

                        this.plcHldGenProjSetting.Controls.Add(userControl);

                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            this.trLiveInterfaces.Disabled = false;
                        }
                        else
                        {
                            this.trLiveInterfaces.Disabled = true;
                        }
                    }
                }
                else if (this.Mode == PubEntAdminManager.strPubGlobalVMode)//view
                {
                    if (this.PubID > 0)
                    {
                        Session[PubEntAdminManager.strPubGlobalMode] = PubEntAdminManager.strPubGlobalVMode;

                        this.btnEdit.Visible = this.btnEdit2.Visible = true;

                        if (PubEntAdminManager.TamperProof)
                        {
                            myUrlBuilder.PageName = "PubRecord.aspx";
                            myUrlBuilder.Query    = "mode=edit&pubid=" + this.PubID.ToString();

                            this.btnEdit.Attributes["onclick"]  += "window.location = '" + myUrlBuilder.ToString(true) + "'";
                            this.btnEdit2.Attributes["onclick"] += "window.location = '" + myUrlBuilder.ToString(true) + "'";
                        }
                        else
                        {
                            this.btnEdit.Attributes["onclick"] += "window.location = 'PubRecord.aspx?mode=edit&pubid=" +
                                                                  this.PubID + "'";
                            this.btnEdit2.Attributes["onclick"] += "window.location = 'PubRecord.aspx?mode=edit&pubid=" +
                                                                   this.PubID + "'";
                        }

                        this.btnSave.Visible   = this.SpellCkr1.Visible = false;
                        this.btnSave2.Visible  = this.SpellCkr2.Visible = false;
                        this.btnCancel.Visible = this.btnCancel2.Visible = false;

                        this.lblPageTitle.Text = "View Publication";

                        if (PubEntAdminManager.TamperProof)
                        {
                            myUrlBuilder.PageName = "Home.aspx";
                            myUrlBuilder.Query    = "action=refine";

                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            myUrlBuilder.PageName = "SearchResult.aspx";
                            myUrlBuilder.Query    = "action=sechres";

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }
                        else
                        {
                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = "~/Home.aspx?action=refine";
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = "~/SearchResult.aspx?action=sechres";
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }

                        userControl =
                            (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataV.ascx");
                        ((GenDataV)userControl).ID    = "GenDataVInfo1";
                        ((GenDataV)userControl).PubID = this.PubID;
                        this.plcHldGenData.Controls.Add(userControl);

                        userControl =
                            (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingV.ascx");
                        ((GenProjSettingV)userControl).ID    = "GenProjSettingVInfo1";
                        ((GenProjSettingV)userControl).PubID = this.PubID;
                        this.plcHldGenProjSetting.Controls.Add(userControl);

                        this.trLiveInterfaces.Disabled = true;
                    }
                }
            }
            else
            {
                if (Session[PubEntAdminManager.strPubGlobalMode] != null)
                {
                    if ((string)Session[PubEntAdminManager.strPubGlobalMode] ==
                        PubEntAdminManager.strPubGlobalAMode)
                    {
                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            this.hplnkBakSechRes.Visible  = this.hplnkRefSech.Visible = false;
                            this.hplnkBakSechRes2.Visible = this.hplnkRefSech2.Visible = false;
                            this.btnEdit.Visible          = this.btnEdit2.Visible = false;
                            this.btnSave.Visible          = this.SpellCkr1.Visible = true;
                            this.btnSave2.Visible         = this.SpellCkr2.Visible = true;
                            this.btnCancel.Visible        = this.btnCancel2.Visible = false;
                            this.lblPageTitle.Text        = "Add New Record";

                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataE.ascx");
                            userControl.ID = "GenDataEInfo1";
                            ((GenDataE)userControl).Mode = this.Mode;
                            this.plcHldGenData.Controls.Add(userControl);

                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingE.ascx");
                            userControl.ID = "GenProjSettingEInfo1";
                            ((GenProjSettingE)userControl).Mode = this.Mode;
                            this.plcHldGenProjSetting.Controls.Add(userControl);

                            this.trLiveInterfaces.Disabled = false;
                        }
                        else
                        {
                            if (PubEntAdminManager.TamperProof)
                            {
                                PubEntAdminManager.RedirectEncodedURLWithQS("UnauthorizedAccess.aspx",
                                                                            PubEntAdminManager.strUnauthorizedDetail + "=Try to access pub record in Add mode");
                            }
                            else
                            {
                                Response.Redirect("UnauthorizedAccess.aspx?" +
                                                  PubEntAdminManager.strUnauthorizedDetail + "=Try to access pub record in Add mode", true);
                            }
                        }
                    }
                    else if ((string)Session[PubEntAdminManager.strPubGlobalMode] ==
                             PubEntAdminManager.strPubGlobalEMode)
                    {
                        this.btnEdit.Visible = this.btnEdit2.Visible = false;

                        //if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        //{
                        this.btnSave.Visible   = this.SpellCkr1.Visible = true;
                        this.btnSave2.Visible  = this.SpellCkr2.Visible = true;
                        this.btnCancel.Visible = this.btnCancel2.Visible = true;
                        //}
                        //else
                        //{
                        //    this.btnSave.Visible = this.SpellCkr1.Visible = false;
                        //    this.btnSave2.Visible = this.SpellCkr2.Visible = false;
                        //    this.btnCancel.Visible = this.btnCancel2.Visible = false;
                        //}
                        //authenticate user
                        this.lblPageTitle.Text = "Edit Record";

                        if (PubEntAdminManager.TamperProof)
                        {
                            myUrlBuilder.PageName = "Home.aspx";
                            myUrlBuilder.Query    = "action=refine";

                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            myUrlBuilder.PageName = "SearchResult.aspx";
                            myUrlBuilder.Query    = "action=sechres";

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }
                        else
                        {
                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = "~/Home.aspx?action=refine";
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = "~/SearchResult.aspx?action=sechres";
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }

                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataE.ascx");
                            ((GenDataE)userControl).ID    = "GenDataEInfo1";
                            ((GenDataE)userControl).Mode  = this.Mode;
                            ((GenDataE)userControl).PubID = this.PubID;
                        }
                        else
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataV.ascx");
                            ((GenDataV)userControl).ID    = "GenDataVInfo1";
                            ((GenDataV)userControl).PubID = this.PubID;
                        }

                        this.plcHldGenData.Controls.Add(userControl);

                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingE.ascx");
                            ((GenProjSettingE)userControl).ID    = "GenProjSettingEInfo1";
                            ((GenProjSettingE)userControl).Mode  = this.Mode;
                            ((GenProjSettingE)userControl).PubID = this.PubID;
                        }
                        else
                        {
                            userControl =
                                (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingV.ascx");
                            ((GenProjSettingV)userControl).ID    = "GenProjSettingVInfo1";
                            ((GenProjSettingV)userControl).PubID = this.PubID;
                        }

                        this.plcHldGenProjSetting.Controls.Add(userControl);

                        if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole))
                        {
                            this.trLiveInterfaces.Disabled = false;
                        }
                        else
                        {
                            this.trLiveInterfaces.Disabled = true;
                        }
                    }
                    else if ((string)Session[PubEntAdminManager.strPubGlobalMode] ==
                             PubEntAdminManager.strPubGlobalVMode)
                    {
                        //if (((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.AdminRole) ||
                        //    ((CustomPrincipal)Context.User).IsInRole(PubEntAdminManager.DWHStaffRole))
                        //{
                        this.btnEdit.Visible = this.btnEdit2.Visible = true;
                        //}
                        //else
                        //{
                        //    this.btnEdit.Visible = this.btnEdit2.Visible = false;
                        //}

                        if (PubEntAdminManager.TamperProof)
                        {
                            myUrlBuilder.PageName = "PubRecord.aspx";
                            myUrlBuilder.Query    = "mode=edit&pubid=" + this.PubID.ToString();

                            this.btnEdit.Attributes["onclick"]  += "window.location = '" + myUrlBuilder.ToString(true) + "'";
                            this.btnEdit2.Attributes["onclick"] += "window.location = '" + myUrlBuilder.ToString(true) + "'";
                        }
                        else
                        {
                            this.btnEdit.Attributes["onclick"] += "window.location = 'PubRecord.aspx?mode=edit&pubid=" +
                                                                  this.PubID + "'";
                            this.btnEdit2.Attributes["onclick"] += "window.location = 'PubRecord.aspx?mode=edit&pubid=" +
                                                                   this.PubID + "'";
                        }

                        this.btnSave.Visible   = this.SpellCkr1.Visible = false;
                        this.btnSave2.Visible  = this.SpellCkr2.Visible = false;
                        this.btnCancel.Visible = this.btnCancel2.Visible = false;

                        this.lblPageTitle.Text = "View Record";

                        if (PubEntAdminManager.TamperProof)
                        {
                            myUrlBuilder.PageName = "Home.aspx";
                            myUrlBuilder.Query    = "action=refine";

                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            myUrlBuilder.PageName = "SearchResult.aspx";
                            myUrlBuilder.Query    = "action=sechres";

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = myUrlBuilder.ToString(true);
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }
                        else
                        {
                            this.hplnkRefSech.NavigateUrl = this.hplnkRefSech2.NavigateUrl = "~/Home.aspx?action=refine";
                            this.hplnkRefSech.Visible     = this.hplnkRefSech2.Visible = true;

                            this.hplnkBakSechRes.NavigateUrl = this.hplnkBakSechRes2.NavigateUrl = "~/SearchResult.aspx?action=sechres";
                            this.hplnkBakSechRes.Visible     = this.hplnkBakSechRes2.Visible = true;
                        }

                        userControl =
                            (System.Web.UI.UserControl) this.LoadControl("UserControl/GenDataV.ascx");
                        ((GenDataV)userControl).ID    = "GenDataVInfo1";
                        ((GenDataV)userControl).PubID = this.PubID;
                        this.plcHldGenData.Controls.Add(userControl);

                        userControl =
                            (System.Web.UI.UserControl) this.LoadControl("UserControl/GenProjSettingV.ascx");
                        ((GenProjSettingV)userControl).ID    = "GenProjSettingVInfo1";
                        ((GenProjSettingV)userControl).PubID = this.PubID;
                        this.plcHldGenProjSetting.Controls.Add(userControl);

                        this.trLiveInterfaces.Disabled = true;
                    }
                }
            }


            userControl =
                (System.Web.UI.UserControl) this.LoadControl("UserControl/AdminMenu.ascx");
            this.plcHldMenu.Controls.Add(userControl);

            userControl =
                (System.Web.UI.UserControl) this.LoadControl("UserControl/LiveIntSel.ascx");
            ((LiveIntSel)userControl).RepeatDirection = RepeatDirection.Vertical;
            ((LiveIntSel)userControl).PubID           = this.PubID;
            this.plcHldLiveInt.Controls.Add(userControl);

            myLiveIntTab =
                (LiveIntTab)this.LoadControl("UserControl/LiveIntTab.ascx");
            myLiveIntTab.ID    = "LiveIntTabInfo1";
            myLiveIntTab.PubID = this.PubID;
            this.plcHldLiveIntTab.Controls.Add(myLiveIntTab);
        }
예제 #7
0
        protected void BindData_(string PubIDs)
        {
            List <Pub> l_listPub = null;

            string l_key = String.Empty;

            if (PubIDs == null)
            {
                l_key = this.CleanSearchTerms(this.PreviousPage.Keyword.Trim());

                l_listPub =
                    PE_DAL.AdminDoSearch(
                        this.PreviousPage.NCIPL ? 1 : 0,
                        this.PreviousPage.ROO ? 1 : 0,
                        this.PreviousPage.Exh ? 1 : 0,
                        this.PreviousPage.Catalog ? 1 : 0,
                        l_key.Length > 0 ? l_key : null,
                        this.PreviousPage.NIHNum1.Trim().Length > 0 ? this.PreviousPage.NIHNum1.Trim() : null,
                        this.PreviousPage.NIHNum2.Trim().Length > 0 ? this.PreviousPage.NIHNum2.Trim() : null,
                        Convert.ToBoolean(this.PreviousPage.Newpub) ? 1 : 0,
                        Convert.ToBoolean(this.PreviousPage.Updatedpub) ? 1 : 0,
                        this.PreviousPage.CreatedFrom.Length > 0 ? Convert.ToDateTime(this.PreviousPage.CreatedFrom) : DateTime.MinValue,
                        this.PreviousPage.CreatedTo.Length > 0 ? Convert.ToDateTime(this.PreviousPage.CreatedTo) : DateTime.MinValue,
                        (this.PreviousPage.SelectedCancerType.Length > 0 && this.PreviousPage.SelectedCancerType != "0") ? this.PreviousPage.SelectedCancerType : null,
                        (this.PreviousPage.SelectedSubject.Length > 0 && this.PreviousPage.SelectedSubject != "0") ? this.PreviousPage.SelectedSubject : null,
                        (this.PreviousPage.SelectedAudience.Length > 0 && this.PreviousPage.SelectedAudience != "0") ? this.PreviousPage.SelectedAudience : null,
                        (this.PreviousPage.SelectedLang.Length > 0 && this.PreviousPage.SelectedLang != "0") ? this.PreviousPage.SelectedLang : null,
                        (this.PreviousPage.SelectedProdFormat.Length > 0 && this.PreviousPage.SelectedProdFormat != "0") ? this.PreviousPage.SelectedProdFormat : null,
                        (this.PreviousPage.SelectedSeries.Length > 0 && this.PreviousPage.SelectedSeries != "0") ? this.PreviousPage.SelectedSeries : null,
                        (this.PreviousPage.SelectedRace.Length > 0 && this.PreviousPage.SelectedRace != "0") ? this.PreviousPage.SelectedRace : null,
                        (this.PreviousPage.SelectedBookStatus.Length > 0 && this.PreviousPage.SelectedBookStatus != "0") ? this.PreviousPage.SelectedBookStatus : null,
                        (this.PreviousPage.SelectedReadingLevel.Length > 0 && this.PreviousPage.SelectedReadingLevel != "0") ? this.PreviousPage.SelectedReadingLevel : null,
                        this.PreviousPage.ROOMostCom ? 1 : 0,
                        (this.PreviousPage.SelectedROOSubject.Length > 0 && this.PreviousPage.SelectedROOSubject != "0") ? this.PreviousPage.SelectedROOSubject : null,
                        (this.PreviousPage.SelectedAward.Length > 0 && this.PreviousPage.SelectedAward != "0") ? this.PreviousPage.SelectedAward : null,
                        (this.PreviousPage.SelectedOwner.Length > 0 && this.PreviousPage.SelectedOwner != "0") ? this.PreviousPage.SelectedOwner : null,
                        (this.PreviousPage.SelectedSponsor.Length > 0 && this.PreviousPage.SelectedSponsor != "0") ? this.PreviousPage.SelectedSponsor : null, null

                        );
            }
            else
            {
                this.mySearch = ((Search)Session[PubEntAdminManager.strSearchCriteria]);

                l_key = this.CleanSearchTerms(this.mySearch.Key.Trim());

                l_listPub = PE_DAL.AdminDoSearch(
                    this.mySearch.NCIPL ? 1 : 0,
                    this.mySearch.ROO ? 1 : 0,
                    this.mySearch.EXH ? 1 : 0,
                    this.mySearch.CATALOG ? 1 : 0,
                    l_key.Length > 0 ? l_key : null,
                    this.mySearch.NIH1.Trim().Length > 0 ? this.mySearch.NIH1.Trim() : null,
                    this.mySearch.NIH2.Trim().Length > 0 ? this.mySearch.NIH2.Trim() : null,
                    Convert.ToBoolean(this.mySearch.ISNEW) ? 1 : 0,
                    Convert.ToBoolean(this.mySearch.ISUPDATED) ? 1 : 0,
                    this.mySearch.CreateFrom.Length > 0 ? Convert.ToDateTime(this.mySearch.CreateFrom) : DateTime.MinValue,
                    this.mySearch.CreateTo.Length > 0 ? Convert.ToDateTime(this.mySearch.CreateTo) : DateTime.MinValue,
                    (this.mySearch.Cancer.Length > 0 && this.mySearch.Cancer != "0") ? this.mySearch.Cancer : null,
                    (this.mySearch.Subj.Length > 0 && this.mySearch.Subj != "0") ? this.mySearch.Subj : null,
                    (this.mySearch.Aud.Length > 0 && this.mySearch.Aud != "0") ? this.mySearch.Aud : null,
                    (this.mySearch.Lang.Length > 0 && this.mySearch.Lang != "0") ? this.mySearch.Lang : null,
                    (this.mySearch.Format.Length > 0 && this.mySearch.Format != "0") ? this.mySearch.Format : null,
                    (this.mySearch.Serie.Length > 0 && this.mySearch.Serie != "0") ? this.mySearch.Serie : null,
                    (this.mySearch.Race.Length > 0 && this.mySearch.Race != "0") ? this.mySearch.Race : null,
                    (this.mySearch.Status.Length > 0 && this.mySearch.Status != "0") ? this.mySearch.Status : null,
                    (this.mySearch.Level.Length > 0 && this.mySearch.Level != "0") ? this.mySearch.Level : null,
                    this.mySearch.ROOCOM ? 1 : 0,
                    (this.mySearch.ROOCOMSubj.Length > 0 && this.mySearch.ROOCOMSubj != "0") ? this.mySearch.ROOCOMSubj : null,
                    (this.mySearch.Award.Length > 0 && this.mySearch.Award != "0")? this.mySearch.Award : null,
                    (this.mySearch.Owner.Length > 0 && this.mySearch.Owner != "0") ? this.mySearch.Owner : null,
                    (this.mySearch.Sponsor.Length > 0 && this.mySearch.Sponsor != "0") ? this.mySearch.Sponsor : null,
                    PubIDs);
            }

            if (l_listPub.Count == 1)
            {
                if (this.Export)
                {
                    this.RemColumnHeadersSortedImg();
                    this.gvResult.DataSource = l_listPub;
                    this.gvResult.DataBind();
                }
                else
                {
                    this.mySearch.ClearPubId();
                    this.mySearch.AddPubId(l_listPub[0].PubID);
                    Session[PubEntAdminManager.strSearchCriteria] = this.mySearch;

                    //go directly to pubrecord page
                    if (PubEntAdminManager.TamperProof)
                    {
                        PubEntAdminManager.RedirectEncodedURLWithQS("PubRecord.aspx", "mode=view&pubid=" + l_listPub[0].PubID.ToString());
                    }
                    else
                    {
                        Response.Redirect("PubRecord.aspx?mode=view&pubid=" + l_listPub[0].PubID.ToString(), true);
                    }
                }
            }
            else
            {
                this.lblTotalResCnt.Text = l_listPub.Count.ToString();

                if (!this.Export)
                {
                    this.mySearch.ClearPubId();
                    //Update the column headers
                    UpdateColumnHeaders();
                }
                else
                {
                    this.RemColumnHeadersSortedImg();
                }

                this.gvResult.DataSource = l_listPub;
                this.gvResult.DataBind();

                if (l_listPub.Count == 0)
                {
                    this.trTopCtrlPnl.Visible   = this.trBtmCtrlPnl.Visible = false;
                    this.gvResult.Visible       = false;
                    this.hyplnkRefSrch2.Visible = this.hyplnkSrch2.Visible = false;
                }
            }
            Session[PubEntAdminManager.strSearchCriteria] = this.mySearch;
        }
예제 #8
0
        protected void BindData(string PubIDs)
        {
            this.mySearch = ((Search)Session[PubEntAdminManager.strSearchCriteria]);
            //this.mySearch.ClearPubId();

            List <Pub> l_listPub = PE_DAL.AdminDoSearchByPubID(PubIDs,
                                                               this.SortExpression == String.Empty ? PubEntAdminManager.strDefaultSearchSorting : this.SortExpression, System.Convert.ToInt32(this.SortAscending));

            //this.lblTotalResCnt.Text = l_listPub.Count.ToString();
            //this.gvResult.DataSource = l_listPub;
            //this.gvResult.DataBind();

            if (l_listPub.Count == 1)
            {
                if (this.Export)
                {
                    this.RemColumnHeadersSortedImg();
                    this.gvResult.DataSource = l_listPub;
                    this.gvResult.DataBind();
                }
                else
                {
                    this.mySearch.ClearPubId();
                    this.mySearch.AddPubId(l_listPub[0].PubID);
                    Session[PubEntAdminManager.strSearchCriteria] = this.mySearch;

                    //go directly to pubrecord page
                    if (PubEntAdminManager.TamperProof)
                    {
                        PubEntAdminManager.RedirectEncodedURLWithQS("PubRecord.aspx", "mode=view&pubid=" + l_listPub[0].PubID.ToString());
                    }
                    else
                    {
                        Response.Redirect("PubRecord.aspx?mode=view&pubid=" + l_listPub[0].PubID.ToString(), true);
                    }
                }
            }
            else
            {
                this.lblTotalResCnt.Text = l_listPub.Count.ToString();

                if (!this.Export)
                {
                    this.mySearch.ClearPubId();
                    //Update the column headers
                    UpdateColumnHeaders();
                }
                else
                {
                    this.RemColumnHeadersSortedImg();
                }

                this.gvResult.DataSource = l_listPub;
                this.gvResult.DataBind();

                if (l_listPub.Count == 0)
                {
                    this.trTopCtrlPnl.Visible   = this.trBtmCtrlPnl.Visible = false;
                    this.gvResult.Visible       = false;
                    this.hyplnkRefSrch2.Visible = this.hyplnkSrch2.Visible = false;
                }
            }

            Session[PubEntAdminManager.strSearchCriteria] = this.mySearch;
        }