Ejemplo n.º 1
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// adds an object to the database
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="objSF_Pledge">The SF_PledgeInfo object</param>
 /// <history>
 /// </history>
 /// -----------------------------------------------------------------------------
 public void AddSF_Pledge(SF_PledgeInfo objSF_Pledge)
 {
     if (objSF_Pledge.Content.Trim() != "")
     {
         DataProvider.Instance().AddSF_Pledge(objSF_Pledge.ModuleId, objSF_Pledge.Content, objSF_Pledge.CreatedByUser);
     }
 }
Ejemplo n.º 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_Pledges = Globals.GetContent(Content, "SF_Pledges");

            foreach (XmlNode xmlSF_Pledge in xmlSF_Pledges.SelectNodes("SF_Pledge"))
            {
                SF_PledgeInfo objSF_Pledge = new SF_PledgeInfo();

                objSF_Pledge.ModuleId      = ModuleID;
                objSF_Pledge.Content       = xmlSF_Pledge.SelectSingleNode("content").InnerText;
                objSF_Pledge.CreatedByUser = UserId;
                AddSF_Pledge(objSF_Pledge);
            }
        }