Exemple #1
0
        private void cbTypeSample_EditValueChanged(object sender, EventArgs e)
        {
            // --- init methods
            if (cbTypeSample.EditValue != null)
            {
                Reception oReception = new Reception();

                var query =
                    (from m in oReception.GetMethodsDenominations(cbTypeSample.EditValue.ToString())
                     select new
                {
                    Idtemplate_method = Convert.ToInt32(m.Idtemplate_method),
                    Title = m.Cod_template_method + " - " + m.Abbreviation + " - " + m.Title
                }).ToList();

                cbMethodAdd.Properties.DataSource    = query;
                cbMethodAdd.Properties.DisplayMember = "Title";
                cbMethodAdd.Properties.ValueMember   = "Idtemplate_method";

                if (cbTypeSample.EditValue != null)
                {
                    tabItems.PageVisible = true;
                }
            }
        }
Exemple #2
0
        void filteringMethods()
        {
            // --- filtering the list of methods
            string codTypeSample = "";

            if (cbTypeSample.EditValue != null)
                codTypeSample = cbTypeSample.EditValue.ToString(); //gvReception.GetFocusedRowCellValue(gcRec_Type_Sample).ToString();

            List<CTemplate_method> lstTemplate_method = gcMethods.DataSource as List<CTemplate_method>;
            Reception oReception = new Reception();
            gcMethods.DataSource = oReception.GetMethodsDenominations(codTypeSample);

            gvMethods.BestFitColumns();
        }