private void ItemRefresh()
        {
            if (Request.QueryString["id"] == null)
            {
                return;
            }
            list.ReadItem(Int32.Parse(Request.QueryString["id"]));
            StringBuilder sb = new StringBuilder();

            XmlBuilder.AppendField(sb, "field_" + FIELD_PARENT_ID, list.Data.Rows[0][FIELD_LEVEL].ToString() + "#" + list.Data.Rows[0][FIELD_PARENT_ID].ToString());
            foreach (DataColumn col in list.Data.Columns)
            {
                if (col.ColumnName != FIELD_PARENT_ID &&
                    col.ColumnName != FIELD_LEVEL)
                {
                    string val = list.Data.Rows[0][col].ToString();
                    if (col.ExtendedProperties.ContainsKey("inputtype"))
                    {
                        if (val != string.Empty)
                        {
                            switch (col.ExtendedProperties["inputtype"].ToString())
                            {
                            case "date":
                                val = Convert.ToDateTime(list.Data.Rows[0][col]).ToString("yyyy-MM-dd");
                                break;

                            case "time":
                                val = Convert.ToDateTime(list.Data.Rows[0][col]).ToLongTimeString();
                                break;

                            case "datetime":
                                val = Convert.ToDateTime(list.Data.Rows[0][col]).ToString(CultureInfo.InvariantCulture);
                                break;

                            case "file":
                                if (restrictedUser)
                                {
                                    if (val.StartsWith(ui.LoginName + "/"))
                                    {
                                        val = val.Substring((ui.LoginName + "/").Length);
                                    }
                                }
                                break;
                            }
                            if (col.DataType == typeof(double))
                            {
                                val = Convert.ToDouble(list.Data.Rows[0][col]).ToString(CultureInfo.InvariantCulture);
                            }
                        }
                    }
                    XmlBuilder.AppendField(sb, "field_" + col.ColumnName, val);
                }
            }
            Response.Write(sb);
        }
        private void ItemRefresh()
        {
            if (Request.QueryString["id"] == null)
            {
                return;
            }
            list.ReadItem(Int32.Parse(Request.QueryString["id"]));
            StringBuilder sb = new StringBuilder();

            XmlBuilder.AppendField(sb, "field_" + FIELD_PARENT_ID, list.Data.Rows[0][FIELD_LEVEL].ToString() + "#" + list.Data.Rows[0][FIELD_PARENT_ID].ToString());
            foreach (DataColumn col in list.Data.Columns)
            {
                if (col.ColumnName != FIELD_PARENT_ID &&
                    col.ColumnName != FIELD_LEVEL)
                {
                    string val = list.Data.Rows[0][col].ToString();
                    if (col.ExtendedProperties.ContainsKey("inputtype"))
                    {
                        if (val != string.Empty)
                        {
                            switch (col.ExtendedProperties["inputtype"].ToString())
                            {
                            case "date":
                                val = Convert.ToDateTime(list.Data.Rows[0][col]).ToString("yyyy-MM-dd");
                                break;

                            case "time":
                                val = Convert.ToDateTime(list.Data.Rows[0][col]).ToLongTimeString();
                                break;
                            }
                        }
                    }
                    XmlBuilder.AppendField(sb, "field_" + col.ColumnName, val);
                }
            }
            Response.Write(sb);
        }