コード例 #1
0
        public void CrudNotification(Notification objNotification)
        {
            //create XML Document Class objct
            xmlDoc = new XmlDocument();
            //creating header tag
            xmlDoc = XMLdoc.CreateXmlHeading(xmlDoc);

            //--------------creating elements with data in header roor------------
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "notificationid", objNotification.NotificationId.ToString());
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "code", objNotification.Code);
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "notificationtext", objNotification.NotificationText);
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "createdby", objNotification.CreatedBy.ToString());
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "modifiedby", objNotification.ModifiedBy.ToString());
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "feeamount", objNotification.FeeAmount.ToString());
            xmlDoc = XMLdoc.AddXmlElement(xmlDoc, "isactive", objNotification.IsActive.ToString());

            //-----------creating elements with data in header roo-----------------------------------

            SqlParameter param = new SqlParameter("@err_msg", SqlDbType.VarChar, 500);
            param.Direction = ParameterDirection.Output;

            lobj1.Database.ExecuteSqlCommand("proc_Notifications @xml,@type,@err_msg out",
                new SqlParameter("@xml", xmlDoc.InnerXml),
                  new SqlParameter("@type", objNotification.Type),
                  param
                );
        }
コード例 #2
0
 public void CrudNotification(Notification objNotification)
 {
     obj.CrudNotification(objNotification);
 }