コード例 #1
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// adds an object to the database
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="objSF_ManageDonation">The SF_ManageDonationInfo object</param>
 /// <history>
 /// </history>
 /// -----------------------------------------------------------------------------
 public void AddSF_ManageDonation(SF_ManageDonationInfo objSF_ManageDonation)
 {
     if (objSF_ManageDonation.Content.Trim() != "")
     {
         DataProvider.Instance().AddSF_ManageDonation(objSF_ManageDonation.ModuleId, objSF_ManageDonation.Content, objSF_ManageDonation.CreatedByUser);
     }
 }
コード例 #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ImportModule implements the IPortable ImportModule Interface
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <param name="ModuleID">The Id of the module to be imported</param>
        /// <param name="Content">The content to be imported</param>
        /// <param name="Version">The version of the module to be imported</param>
        /// <param name="UserId">The Id of the user performing the import</param>
        /// <history>
        /// </history>
        /// -----------------------------------------------------------------------------
        public void ImportModule(int ModuleID, string Content, string Version, int UserId)
        {
            XmlNode xmlSF_ManageDonations = Globals.GetContent(Content, "SF_ManageDonations");

            foreach (XmlNode xmlSF_ManageDonation in xmlSF_ManageDonations.SelectNodes("SF_ManageDonation"))
            {
                SF_ManageDonationInfo objSF_ManageDonation = new SF_ManageDonationInfo();

                objSF_ManageDonation.ModuleId      = ModuleID;
                objSF_ManageDonation.Content       = xmlSF_ManageDonation.SelectSingleNode("content").InnerText;
                objSF_ManageDonation.CreatedByUser = UserId;
                AddSF_ManageDonation(objSF_ManageDonation);
            }
        }