コード例 #1
0
ファイル: SearchWindow.cs プロジェクト: njmube/openposbr
        /// <summary>
        /// Exibe o formulário de psquisa com os registros
        /// </summary>
        ///<param name="model">Modelo que deverá s</param>
        public static SearchWindowResult Show(IParentModel model)
        {
            SearchWindowForm form = new SearchWindowForm();
            form.MainGrid.Populate(model.GetDisplayValues());
            form.ShowDialog();
            SearchWindowResult result = form.Result;
            form.Close();
            form.Dispose();

            return result;
        }
コード例 #2
0
ファイル: SearchWindow.cs プロジェクト: njmube/openposbr
        /// <summary>
        /// Exibe o formulário de pesquisa com os registros
        /// </summary>
        ///<param name="values">Coleção do tipo IDisplayValues</param>
        public static SearchWindowResult Show(IDisplayValues values, string filter = "")
        {
            SearchWindowForm form = new SearchWindowForm();
            values.ApplyFilters(filter.IsNullOrEmpty() ? null : form.Predicate(filter));
            form.MainGrid.Populate(values);
            form.TopMost = true;
            form.ShowDialog();
            SearchWindowResult result = form.Result;
            form.Close();
            form.Dispose();

            return result;
        }