Пример #1
0
        private void Search()
        {
            try
            {
                var opar = new BEArticle();
                var sortindex = gdvSearch.SortedColumns[0].VisibleIndex;
                if (sortindex == 0)
                    opar.ALF_CODI_ARTI = txtParameter.Text.Trim();
                else
                    opar.ALF_ARTI = txtParameter.Text.Trim();
                opar.COD_COMP = xfMain.SgIns.SESSION_COMP;

                var obr = new BRArticle();
                var olst = obr.Get_PSGN_SPLS_SVMC_ARTI(opar);

                gdcSearch.DataSource = olst;
                gdvSearch.MoveFirst();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, WhMessage.MsgInsCaption,
                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }