public bool SaveLayout(AMS.Profile.IProfile profile)
        {
            if (m_sm == null)
                return false;
            if (m_sm.MaxResult != SearchManagerDefaultValue.MaxResult)
            {
                profile.SetValue("SearchManager." + m_sm.Name, "MaxResult", m_sm.MaxResult);
            }

            StringBuilder sb = new StringBuilder();
            int idx = 0;
            while (true)
            {
                SearchHistoryInfo his = m_sm.GetHistory(idx);
                if (!string.IsNullOrEmpty(his.Expression))
                {
                    sb.Append(his.Expression);
                    if (!string.IsNullOrEmpty(his.Order))
                    {
                        sb.Append(";");
                        sb.Append(his.Order);
                    }
                    sb.Append(Environment.NewLine);

                    idx++;
                }
                else
                {
                    break;
                }
            }
            profile.SetValue("SearchManager." + m_sm.Name, "History", sb.ToString());

            bool ret = this.searchControlContainer1.SaveLayout(profile);
            return ret;
        }
 public bool SaveLayout(AMS.Profile.IProfile profile)
 {
     if (this.SearchManager != null)
     {
         if (this.SearchManager.MaxResult != SearchManagerDefaultValue.MaxResult)
         {
             profile.SetValue("SearchManager." + this.BindingSource.SearchManager.Name, "MaxResult", this.BindingSource.SearchManager.MaxResult);
         }
         return true;
     }
     else
     {
         return false;
     }
 }
        /// <summary>
        /// ����Column����
        /// </summary>
        /// <param name="grid"></param>
        /// <param name="sectionName"></param>
        public bool SaveLayout(AMS.Profile.IProfile profile)
        {
            if (m_sm == null)
                return false;
            string sectionName = "SearchControlContainer." + "." + m_sm.Name + ".Layout";

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < m_sm.SearchControls.Count; ++i)
            {
                sb.Append(m_sm.SearchControls[i].Name);
                sb.Append(",");
                sb.Append(m_sm.SearchControls[i].Available);
                sb.Append(",");
                sb.Append(m_sm.SearchControls[i].Index);
                sb.Append(System.Environment.NewLine);
            }
            profile.SetValue(sectionName, "SearchControls", sb.ToString());

            return true;
        }
 /// <summary>
 /// 保存Column布局
 /// </summary>
 /// <param name="grid"></param>
 /// <param name="sectionName"></param>
 private static bool SaveLayout(this IGrid grid, string sectionName, AMS.Profile.IProfile profile)
 {
     StringBuilder sb = new StringBuilder();
     for (int i = 0; i < grid.Columns.Count; ++i)
     {
         sb.Append(grid.Columns[i].FieldName);
         sb.Append(",");
         sb.Append(grid.Columns[i].Visible);
         sb.Append(",");
         sb.Append(grid.Columns[i].VisibleIndex);
         sb.Append(",");
         sb.Append(grid.Columns[i].Width);
         sb.Append(",");
         sb.Append(grid.Columns[i].Fixed);
         sb.Append(System.Environment.NewLine);
     }
     profile.SetValue(sectionName, "Column", sb.ToString());
     return true;
 }
        /// <summary>
        /// SaveLayout
        /// </summary>
        /// <param name="profile"></param>
        public bool SaveLayout(AMS.Profile.IProfile profile)
        {
            string sectionName = "ArchiveDetailForm." + "." + this.Name + "." + m_controlGroupName + ".Layout";

            if (m_dm != null && m_dm.DataControls.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < m_dm.DataControls.Count; ++i)
                {
                    sb.Append(m_dm.DataControls[i].Name);
                    sb.Append(",");
                    sb.Append(m_dm.DataControls[i].Available);
                    sb.Append(System.Environment.NewLine);
                }
                profile.SetValue(sectionName, "DataControls", sb.ToString());
            }
            return true;
        }