This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XML NULL FIELD REMOVAL | |
// Removes all Null fields (both with nil=true) from a XmlDoc | |
public static XmlDocument RemoveNullFields(this XmlDocument xmldoc) | |
{ | |
XmlNamespaceManager mgr = new XmlNamespaceManager(xmldoc.NameTable); | |
mgr.AddNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"); | |
XmlNodeList nullFields = xmldoc.SelectNodes("//*[@xsi:nil='true']", mgr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XML DESERIALIZER | |
// Used for deserializing XML serialized by the default C# serializer into Models | |
// that match the XML structure. | |
public static T XmlDeserializeFromString<T>(string objectData) | |
{ | |
return (T)XmlDeserializeFromString(objectData, typeof(T), typeof(T).Name); | |
} | |
public static object XmlDeserializeFromString(string objectData, Type type, string rootname) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hideAndResetCollection(containerFormElement) { | |
var container = ""; | |
if (containerFormElement instanceof jQuery) { | |
container = $(containerFormElement.selector + ' :input'); | |
} else { | |
container = $(containerFormElement); | |
} | |
$.each(container, function (index, value) { | |
hideAndReset($(value)); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PopUpMessage dialog helper | |
// Requires a div for messagebox and a inner div for inner-message | |
function PopupMessage(text,title) { | |
$('.inner-message').text(text); | |
$('.message-box').dialog( | |
{ | |
title: title, | |
modal: true, | |
buttons: [{ text: "Ok", click: function () { $(this).dialog("close"); } }] |