protected override void Accion_Despues_Grabar()
 {
     // --- reference material
     CMrFactory faMr = new CMrFactory();
     cbCodMR.Properties.DataSource = faMr.GetAll();
     cbCodMR.Properties.ValueMember = "Idmr";
     cbCodMR.Properties.DisplayMember = "Cod_mr";
 }
示例#2
0
        protected override void Accion_Despues_Grabar()
        {
            // --- reference material
            CMrFactory faMr = new CMrFactory();

            cbCodMR.Properties.DataSource    = faMr.GetAll();
            cbCodMR.Properties.ValueMember   = "Idmr";
            cbCodMR.Properties.DisplayMember = "Cod_mr";
        }
        private void FormMaterialReference_Load(object sender, EventArgs e)
        {
            // --- Initialize material of reference
            CMrFactory faMr = new CMrFactory();
            cbCodMR.Properties.DataSource = faMr.GetAll();
            cbCodMR.Properties.ValueMember = "Idmr";
            cbCodMR.Properties.DisplayMember = "Cod_mr";

            // --- Initialize description sample
            cbDescription.Properties.DataSource = Comun.ListTypeMaterial;
            cbDescription.Properties.ValueMember = "IdTypeMaterial";
            cbDescription.Properties.DisplayMember = "Description";

            // --- Initialize type of analysis
            CDigestion_methodFactory faDigestion_method = new CDigestion_methodFactory();
            repTypeDigestion.DataSource = faDigestion_method.GetAll();
            repTypeDigestion.ValueMember = "Cod_digestion_method";
            repTypeDigestion.DisplayMember = "Name_digestion_method";

            // --- Initialize the type of material reference
            cbTypeMr.Properties.DataSource = Comun.ListMr;
            cbTypeMr.Properties.DisplayMember = "Den_TypeMr";
            cbTypeMr.Properties.ValueMember = "IdTypeMr";

            // --- Initialize in container grid element
            CElementFactory faElement = new CElementFactory();
            repElement.DataSource = faElement.GetAll();
            repElement.DisplayMember = "Cod_element";
            repElement.ValueMember = "Idelement";

            // --- Initialize in container grid unit measurement
            CMeasurement_unitFactory faMeasurement_unit = new CMeasurement_unitFactory();
            repTypeUnit.DataSource = faMeasurement_unit.GetAll();
            repTypeUnit.DisplayMember = "Name_unit";
            repTypeUnit.ValueMember = "Idunit";

            // --- Inititalize list statusMr
            lstStatusMr = new BindingList<CStatusMr>();
            lstStatusMr.Add(new CStatusMr { IDStatusMr = true, Description = "Vigente" });
            lstStatusMr.Add(new CStatusMr { IDStatusMr = false, Description = "No vigente" });
            cbStatus.Properties.DataSource = lstStatusMr;
            cbStatus.Properties.DisplayMember = "Description";
            cbStatus.Properties.ValueMember = "IDStatusMr";

            // --- Initialize in container grid company
            CCompanyFactory faCompany = new CCompanyFactory();
            List<CCompany> lstCompany = faCompany.GetAll().Where(c=> c.Type_company == 'P').ToList();

            cbManufacturer.Properties.DataSource = lstCompany;
            cbManufacturer.Properties.DisplayMember = "Business_name";
            cbManufacturer.Properties.ValueMember = "Idcompany";

            cbCertifier.Properties.DataSource = lstCompany;
            cbCertifier.Properties.DisplayMember = "Business_name";
            cbCertifier.Properties.ValueMember = "Idcompany";

            // --- Initialize the grid
            GetDetailMaterialReference();
        }
示例#4
0
        private void FormMaterialReference_Load(object sender, EventArgs e)
        {
            // --- Initialize material of reference
            CMrFactory faMr = new CMrFactory();

            cbCodMR.Properties.DataSource    = faMr.GetAll();
            cbCodMR.Properties.ValueMember   = "Idmr";
            cbCodMR.Properties.DisplayMember = "Cod_mr";

            // --- Initialize description sample
            cbDescription.Properties.DataSource    = Comun.ListTypeMaterial;
            cbDescription.Properties.ValueMember   = "IdTypeMaterial";
            cbDescription.Properties.DisplayMember = "Description";

            // --- Initialize type of analysis
            CDigestion_methodFactory faDigestion_method = new CDigestion_methodFactory();

            repTypeDigestion.DataSource    = faDigestion_method.GetAll();
            repTypeDigestion.ValueMember   = "Cod_digestion_method";
            repTypeDigestion.DisplayMember = "Name_digestion_method";

            // --- Initialize the type of material reference
            cbTypeMr.Properties.DataSource    = Comun.ListMr;
            cbTypeMr.Properties.DisplayMember = "Den_TypeMr";
            cbTypeMr.Properties.ValueMember   = "IdTypeMr";

            // --- Initialize in container grid element
            CElementFactory faElement = new CElementFactory();

            repElement.DataSource    = faElement.GetAll();
            repElement.DisplayMember = "Cod_element";
            repElement.ValueMember   = "Idelement";

            // --- Initialize in container grid unit measurement
            CMeasurement_unitFactory faMeasurement_unit = new CMeasurement_unitFactory();

            repTypeUnit.DataSource    = faMeasurement_unit.GetAll();
            repTypeUnit.DisplayMember = "Name_unit";
            repTypeUnit.ValueMember   = "Idunit";

            // --- Inititalize list statusMr
            lstStatusMr = new BindingList <CStatusMr>();
            lstStatusMr.Add(new CStatusMr {
                IDStatusMr = true, Description = "Vigente"
            });
            lstStatusMr.Add(new CStatusMr {
                IDStatusMr = false, Description = "No vigente"
            });
            cbStatus.Properties.DataSource    = lstStatusMr;
            cbStatus.Properties.DisplayMember = "Description";
            cbStatus.Properties.ValueMember   = "IDStatusMr";

            // --- Initialize in container grid company
            CCompanyFactory faCompany  = new CCompanyFactory();
            List <CCompany> lstCompany = faCompany.GetAll().Where(c => c.Type_company == 'P').ToList();

            cbManufacturer.Properties.DataSource    = lstCompany;
            cbManufacturer.Properties.DisplayMember = "Business_name";
            cbManufacturer.Properties.ValueMember   = "Idcompany";

            cbCertifier.Properties.DataSource    = lstCompany;
            cbCertifier.Properties.DisplayMember = "Business_name";
            cbCertifier.Properties.ValueMember   = "Idcompany";

            // --- Initialize the grid
            GetDetailMaterialReference();
        }