コード例 #1
0
        /// <summary> Saves the data rendered by this element to the provided bibliographic object during postback </summary>
        /// <param name="Bib"> Object into which to save the user's data, entered into the html rendered by this element </param>
        public override void Save_To_Bib(SobekCM_Item Bib)
        {
            const string HTML_ELEMENT_NAME = "complex_publisher";
            string       id = HTML_ELEMENT_NAME.Replace("_", "");

            string[] getKeys = HttpContext.Current.Request.Form.AllKeys;
            foreach (string thisKey in getKeys)
            {
                if ((thisKey.IndexOf(id) == 0) && (thisKey.IndexOf("loc") < 0))
                {
                    string name = HttpContext.Current.Request.Form[thisKey].Trim();

                    string key      = thisKey.Replace(id + "_name", "");
                    string loc1_key = id + "_firstloc" + key;
                    string loc2_key = id + "_secondloc" + key;
                    string loc3_key = id + "_thirdloc" + key;

                    string loc1 = HttpContext.Current.Request.Form[loc1_key].Trim();
                    string loc2 = HttpContext.Current.Request.Form[loc2_key].Trim();
                    string loc3 = HttpContext.Current.Request.Form[loc3_key].Trim();

                    if ((name.Length > 0) || (loc1.Length > 0) || (loc2.Length > 0) || (loc3.Length > 0))
                    {
                        Publisher_Info publisher = Bib.Bib_Info.Add_Publisher(name);
                        if (loc1.Length > 0)
                        {
                            publisher.Add_Place(loc1);
                        }
                        if (loc2.Length > 0)
                        {
                            publisher.Add_Place(loc2);
                        }
                        if (loc3.Length > 0)
                        {
                            publisher.Add_Place(loc3);
                        }
                    }
                }
            }
        }
コード例 #2
0
        /// <summary> Saves the data rendered by this element to the provided bibliographic object during postback </summary>
        /// <param name="Bib"> Object into which to save the user's data, entered into the html rendered by this element </param>
        public override void Save_To_Bib(SobekCM_Item Bib)
        {
            const string HTML_ELEMENT_NAME = "complex_temporal";
            string       id = HTML_ELEMENT_NAME.Replace("_", "");

            string[] getKeys = HttpContext.Current.Request.Form.AllKeys;
            foreach (string thisKey in getKeys)
            {
                if ((thisKey.IndexOf(id) == 0) && (thisKey.IndexOf("end") < 0) && (thisKey.IndexOf("period") < 0))
                {
                    string start = HttpContext.Current.Request.Form[thisKey].Trim();

                    string key        = thisKey.Replace(id + "_start", "");
                    string end_key    = id + "_end" + key;
                    string period_key = id + "_period" + key;

                    string end    = HttpContext.Current.Request.Form[end_key].Trim();
                    string period = HttpContext.Current.Request.Form[period_key].Trim();

                    if ((start.Length > 0) || (end.Length > 0) || (period.Length > 0))
                    {
                        int start_year;
                        int end_year;
                        if (!Int32.TryParse(start, out start_year))
                        {
                            start_year = -1;
                        }
                        if (!Int32.TryParse(end, out end_year))
                        {
                            end_year = -1;
                        }
                        Bib.Bib_Info.Add_Temporal_Subject(start_year, end_year, period);
                    }
                }
            }
        }
コード例 #3
0
        /// <summary> Saves the data rendered by this element to the provided bibliographic object during postback </summary>
        /// <param name="Bib"> Object into which to save the user's data, entered into the html rendered by this element </param>
        public override void Save_To_Bib(SobekCM_Item Bib)
        {
            const string HTML_ELEMENT_NAME = "complex_note";
            string       id = HTML_ELEMENT_NAME.Replace("_", "");

            string[] getKeys = HttpContext.Current.Request.Form.AllKeys;
            foreach (string thisKey in getKeys)
            {
                if (thisKey.IndexOf("complexnote_type") == 0)
                {
                    string key          = thisKey.Replace("complexnote_type", "");
                    string addtl_key    = id + "_input" + key;
                    string textarea_key = id + "_textarea" + key;

                    string         type      = HttpContext.Current.Request.Form[thisKey].Trim();
                    Note_Type_Enum type_enum = Note_Type_Enum.NONE;
                    switch (type)
                    {
                    case "541":
                        type_enum = Note_Type_Enum.acquisition;
                        break;

                    case "530":
                        type_enum = Note_Type_Enum.additional_physical_form;
                        break;

                    case "504":
                        type_enum = Note_Type_Enum.bibliography;
                        break;

                    case "545":
                        type_enum = Note_Type_Enum.biographical;
                        break;

                    case "510":
                        type_enum = Note_Type_Enum.citation_reference;
                        break;

                    case "508":
                        type_enum = Note_Type_Enum.creation_credits;
                        break;

                    case "362":
                        type_enum = Note_Type_Enum.dates_sequential_designation;
                        break;

                    case "donation":
                        type_enum = Note_Type_Enum.donation;
                        break;

                    case "585":
                        type_enum = Note_Type_Enum.exhibitions;
                        break;

                    case "536":
                        type_enum = Note_Type_Enum.funding;
                        break;

                    case "internal":
                        type_enum = Note_Type_Enum.internal_comments;
                        break;

                    case "550":
                        type_enum = Note_Type_Enum.issuing_body;
                        break;

                    case "546":
                        type_enum = Note_Type_Enum.language;
                        break;

                    case "515":
                        type_enum = Note_Type_Enum.numbering_peculiarities;
                        break;

                    case "535":
                        type_enum = Note_Type_Enum.original_location;
                        break;

                    case "534":
                        type_enum = Note_Type_Enum.original_version;
                        break;

                    case "561":
                        type_enum = Note_Type_Enum.ownership;
                        break;

                    case "511":
                        type_enum = Note_Type_Enum.performers;
                        break;

                    case "524":
                        type_enum = Note_Type_Enum.preferred_citation;
                        break;

                    case "581":
                        type_enum = Note_Type_Enum.publications;
                        break;

                    case "506":
                        type_enum = Note_Type_Enum.restriction;
                        break;

                    case "245":
                        type_enum = Note_Type_Enum.statement_of_responsibility;
                        break;

                    case "538":
                        type_enum = Note_Type_Enum.system_details;
                        break;

                    case "502":
                        type_enum = Note_Type_Enum.thesis;
                        break;

                    case "518":
                        type_enum = Note_Type_Enum.date_venue;
                        break;

                    case "562":
                        type_enum = Note_Type_Enum.version_identification;
                        break;

                    case "pubstatus":
                        type_enum = Note_Type_Enum.publication_status;
                        break;
                    }

                    string addtl = String.Empty;
                    if (HttpContext.Current.Request.Form[addtl_key] != null)
                    {
                        addtl = HttpContext.Current.Request.Form[addtl_key].Trim();
                    }
                    string textarea = HttpContext.Current.Request.Form[textarea_key].Trim();

                    if (textarea.Length > 0)
                    {
                        Bib.Bib_Info.Add_Note(textarea, type_enum, addtl);
                    }
                }
            }
        }
コード例 #4
0
        /// <summary> Saves the data rendered by this element to the provided bibliographic object during postback </summary>
        /// <param name="Bib"> Object into which to save the user's data, entered into the html rendered by this element </param>
        public override void Save_To_Bib(SobekCM_Item Bib)
        {
            const string HTML_ELEMENT_NAME = "complex_note";
            string       id = HTML_ELEMENT_NAME.Replace("_", "");

            string[] getKeys = HttpContext.Current.Request.Form.AllKeys;
            foreach (string thisKey in getKeys)
            {
                if (thisKey.IndexOf("complexnote_type") == 0)
                {
                    string key          = thisKey.Replace("complexnote_type", "");
                    string addtl_key    = id + "_input" + key;
                    string textarea_key = id + "_textarea" + key;

                    string         type      = HttpContext.Current.Request.Form[thisKey].Trim();
                    Note_Type_Enum type_enum = Note_Type_Enum.NONE;
                    switch (type)
                    {
                    case "541":
                        type_enum = Note_Type_Enum.Acquisition;
                        break;

                    case "530":
                        type_enum = Note_Type_Enum.AdditionalPhysicalForm;
                        break;

                    case "504":
                        type_enum = Note_Type_Enum.Bibliography;
                        break;

                    case "545":
                        type_enum = Note_Type_Enum.Biographical;
                        break;

                    case "510":
                        type_enum = Note_Type_Enum.CitationReference;
                        break;

                    case "508":
                        type_enum = Note_Type_Enum.CreationCredits;
                        break;

                    case "362":
                        type_enum = Note_Type_Enum.DatesSequentialDesignation;
                        break;

                    case "donation":
                        type_enum = Note_Type_Enum.Donation;
                        break;

                    case "585":
                        type_enum = Note_Type_Enum.Exhibitions;
                        break;

                    case "536":
                        type_enum = Note_Type_Enum.Funding;
                        break;

                    case "internal":
                        type_enum = Note_Type_Enum.InternalComments;
                        break;

                    case "550":
                        type_enum = Note_Type_Enum.IssuingBody;
                        break;

                    case "546":
                        type_enum = Note_Type_Enum.Language;
                        break;

                    case "515":
                        type_enum = Note_Type_Enum.NumberingPeculiarities;
                        break;

                    case "535":
                        type_enum = Note_Type_Enum.OriginalLocation;
                        break;

                    case "534":
                        type_enum = Note_Type_Enum.OriginalVersion;
                        break;

                    case "561":
                        type_enum = Note_Type_Enum.Ownership;
                        break;

                    case "511":
                        type_enum = Note_Type_Enum.Performers;
                        break;

                    case "524":
                        type_enum = Note_Type_Enum.PreferredCitation;
                        break;

                    case "581":
                        type_enum = Note_Type_Enum.Publications;
                        break;

                    case "506":
                        type_enum = Note_Type_Enum.Restriction;
                        break;

                    case "245":
                        type_enum = Note_Type_Enum.StatementOfResponsibility;
                        break;

                    case "538":
                        type_enum = Note_Type_Enum.SystemDetails;
                        break;

                    case "502":
                        type_enum = Note_Type_Enum.Thesis;
                        break;

                    case "518":
                        type_enum = Note_Type_Enum.DateVenue;
                        break;

                    case "562":
                        type_enum = Note_Type_Enum.VersionIdentification;
                        break;

                    case "pubstatus":
                        type_enum = Note_Type_Enum.PublicationStatus;
                        break;
                    }

                    string addtl = String.Empty;
                    if (HttpContext.Current.Request.Form[addtl_key] != null)
                    {
                        addtl = HttpContext.Current.Request.Form[addtl_key].Trim();
                    }
                    string textarea = HttpContext.Current.Request.Form[textarea_key].Trim();

                    if (textarea.Length > 0)
                    {
                        Bib.Bib_Info.Add_Note(textarea, type_enum, addtl);
                    }
                }
            }
        }