Exemplo n.º 1
0
    public string GetCustomData(Terrasoft.UI.WebControls.PageSchemaUserControl page, string clientID, string customDataKey)
    {
        string  result      = null;
        var     aspPage     = page.AspPage as Terrasoft.UI.WebControls.Page;
        JObject tempData    = null;
        string  tempDataKey = "tempData";

        if (aspPage.CustomData.ContainsKey(tempDataKey))
        {
            tempData = aspPage.CustomData[tempDataKey] as JObject;
            if (tempData != null)
            {
                var controlTempData = tempData[clientID];
                if (controlTempData != null)
                {
                    var tdkValue = controlTempData[customDataKey];
                    if (tdkValue != null)
                    {
                        var jValue = (Newtonsoft.Json.Linq.JValue)tdkValue;
                        result = jValue.Value.ToString();
                    }
                }
            }
        }
        return(result);
    }
 public virtual void SetFilter(Terrasoft.UI.WebControls.PageSchemaUserControl pageInstance, Terrasoft.UI.WebControls.Controls.DataSourceFilterCollection filter)
 {
     pageInstance.Process.SetPropertyValue(DetailPageFilterName, filter);
 }