Esempio n. 1
0
        void InitData()
        {
            CReactiveFactory faReactive = new CReactiveFactory();

            cbFormula.Properties.DataSource    = faReactive.GetAll();
            cbFormula.Properties.DisplayMember = "Chemical_formula";
            cbFormula.Properties.ValueMember   = "Idreactive";
        }
Esempio n. 2
0
        void InitData()
        {
            CReactiveFactory faReactive  = new CReactiveFactory();
            List <CReactive> lstReactive = faReactive.GetAll();

            lstReactive.Add(new CReactive()
            {
                Idreactive = 0, Reactive_name = "---", Chemical_formula = "---"
            });

            cbMedium.Properties.DataSource    = lstReactive;
            cbMedium.Properties.ValueMember   = "Idreactive";
            cbMedium.Properties.DisplayMember = "Reactive_name";

            cbModif.Properties.DataSource    = lstReactive;
            cbModif.Properties.ValueMember   = "Idreactive";
            cbModif.Properties.DisplayMember = "Reactive_name";

            CTemplate_method_aa        oTemplate_method_aa  = new CTemplate_method_aa();
            CTemplate_method_aaFactory faTemplate_method_aa = new CTemplate_method_aaFactory();

            oTemplate_method_aa =
                faTemplate_method_aa.GetByPrimaryKey(new CTemplate_method_aaKeys(idtemplate_method));

            idreactive_medium = oTemplate_method_aa.Medium;
            idreactive_modif  = oTemplate_method_aa.Modif;

            LstAllCalibs          = oModCalibStd.GetCustomCalibStd(idelement, idmr_detail, idreactive_medium, idreactive_modif);
            gcCalibStd.DataSource = LstAllCalibs;
            gvCalibStd.ExpandAllGroups();


            //oGroup_solution = oModCalibStd.GetMethodCalib(idelement, idmr_detail, idreactive_medium, idreactive_modif);

            CElement oElement = new CElementFactory()
                                .GetByPrimaryKey(new CElementKeys(Convert.ToInt16(idelement)));


            ucTraceUser1.UserSign = Comun.GetUser();
            ucTraceUser1.DateSign = Comun.GetDate();
        }
Esempio n. 3
0
        public void Init(int idsolution_interm, CTemplate_method_aa template_method_aa)
        {
            Idtemplate_method             = template_method_aa.Idtemplate_method;
            rgSelectGraphic.SelectedIndex = 1;

            CReactiveFactory faReactive  = new CReactiveFactory();
            List <CReactive> lstReactive = faReactive.GetAll();

            lstReactive.Add(new CReactive()
            {
                Idreactive = 0, Reactive_name = "---", Chemical_formula = "---"
            });

            cbMedium.Properties.DataSource    = lstReactive;
            cbMedium.Properties.ValueMember   = "Idreactive";
            cbMedium.Properties.DisplayMember = "Reactive_name";

            cbModif.Properties.DataSource    = lstReactive;
            cbModif.Properties.ValueMember   = "Idreactive";
            cbModif.Properties.DisplayMember = "Reactive_name";

            LstAllCalibs = new BindingList <CCustomCalibStd>(oModCalibStd.GetCustomCalibStd(idsolution_interm, template_method_aa));

            CSet_calibs oSet_calibs = new CSet_calibsFactory()
                                      .GetAll()
                                      .Where(x => x.Idsolution_interm == idsolution_interm &&
                                             x.Idtemplate_method == template_method_aa.Idtemplate_method &&
                                             x.Last_calib == true)
                                      .FirstOrDefault();

            if (oSet_calibs != null)
            {
                ucTraceUser1.UserSign = oSet_calibs.Usersign;
                ucTraceUser1.DateSign = Convert.ToDateTime(oSet_calibs.Datesign);
            }

            gcCalibStd.DataSource = LstAllCalibs;

            PlotChart();
        }
Esempio n. 4
0
        public void Init(int idsolution_interm, CTemplate_method_aa template_method_aa)
        {
            Idtemplate_method = template_method_aa.Idtemplate_method;
            rgSelectGraphic.SelectedIndex = 1;

            CReactiveFactory faReactive = new CReactiveFactory();
            List<CReactive> lstReactive = faReactive.GetAll();

            lstReactive.Add(new CReactive() { Idreactive = 0, Reactive_name = "---", Chemical_formula = "---" });

            cbMedium.Properties.DataSource = lstReactive;
            cbMedium.Properties.ValueMember = "Idreactive";
            cbMedium.Properties.DisplayMember = "Reactive_name";

            cbModif.Properties.DataSource = lstReactive;
            cbModif.Properties.ValueMember = "Idreactive";
            cbModif.Properties.DisplayMember = "Reactive_name";

            LstAllCalibs = new BindingList<CCustomCalibStd>(oModCalibStd.GetCustomCalibStd(idsolution_interm, template_method_aa));

            CSet_calibs oSet_calibs = new CSet_calibsFactory()
                .GetAll()
                .Where(x => x.Idsolution_interm == idsolution_interm
                    && x.Idtemplate_method == template_method_aa.Idtemplate_method
                    && x.Last_calib == true)
                .FirstOrDefault();

            if (oSet_calibs != null)
            {
                ucTraceUser1.UserSign = oSet_calibs.Usersign;
                ucTraceUser1.DateSign = Convert.ToDateTime(oSet_calibs.Datesign);
            }

            gcCalibStd.DataSource = LstAllCalibs;

            PlotChart();
        }
Esempio n. 5
0
        public void Init(CGroup_solution p_group_solution)
        {
            #region inicializar metodos

            group_solution = p_group_solution;
            // --- si existe el agrupador, hacer no editable la selección de métodos
            if (group_solution.Idgroup_solution == 0)
            {
                // --- no existe agrupador
                group_solution.Flag_selected_methods = false;
                gvMethods.OptionsBehavior.Editable = true;
                btConfirmSelMethods.Enabled = true;
            }
            else
            {
                // --- existe agrupador
                group_solution.Flag_selected_methods = true;
                gvMethods.OptionsBehavior.Editable = false;
                btConfirmSelMethods.Enabled = false;
            }

            // --- show grids
            ShowGrids();

            #endregion

            #region inicializar combos
            // --- Inititalize list statusMr
            CReactiveFactory faReactive = new CReactiveFactory();
            List<CReactive> lstReactive = faReactive.GetAll();
            lstReactive.Add(new CReactive() { Idreactive = 0, Reactive_name = "---", Chemical_formula = "---" });

            cbMediumHead.Properties.DataSource = lstReactive;
            cbMediumHead.Properties.ValueMember = "Idreactive";
            cbMediumHead.Properties.DisplayMember = "Reactive_name";

            cbModifHead.Properties.DataSource = lstReactive;
            cbModifHead.Properties.ValueMember = "Idreactive";
            cbModifHead.Properties.DisplayMember = "Reactive_name";

            #endregion

            #region inicializar datos según el filtro seleccionado

            // Estandares de calibración.
            if (group_solution.Type_solution == 1)
            {
                // --- recuperar cajas de textos no editables
                cbTypePattern.EditValue = group_solution.Type_pattern;
                cbMrcOrPatternHeader.EditValue = group_solution.Idmr_detail;
                cbMediumHead.EditValue = group_solution.Idreactive_medium;
                cbModifHead.EditValue = group_solution.Idreactive_modif;

                // --- elemento, mr pattern, medio y modif
                //TODO
                //lstTemplate = modSolution.GetMethodsByMrcPattern(group_solution);
                gcMethods.DataSource = lstTemplate;
            }
            // Soluciones intermedias 1 y 2 y estandares de verificación.
            //else if (group_solution.Type_solution == 2
            //    || group_solution.Type_solution == 3)
            //{
            //    // recuperar cajas de textos no editables
            //    cbTypePattern.EditValue = group_solution.Type_pattern;
            //    cbMrcOrPatternHeader.EditValue = group_solution.Idmr_detail;

            //    // elemento, mr pattern, sol intermedia (1 ó 2 implicito)
            //    // getLstMethods(group_solution, type_solution_intermedia)
            //    lstTemplate = modSolution.GetMethodsBySolInterm(group_solution, );
            //    gcMethods.DataSource = lstTemplate;
            //}

            #endregion
        }
Esempio n. 6
0
        public void InitData()
        {
            #region init combos

            try
            {
                // --- init: type of sample
                CType_sampleFactory faType_Sample = new CType_sampleFactory();
                cbTypeSample.Properties.DataSource    = faType_Sample.GetAll();
                cbTypeSample.Properties.ValueMember   = "Cod_type_sample";
                cbTypeSample.Properties.DisplayMember = "Name_type_sample";

                repTypeSample.DataSource    = faType_Sample.GetAll();
                repTypeSample.ValueMember   = "Cod_type_sample";
                repTypeSample.DisplayMember = "Name_type_sample";

                // --- init: type of analysis
                cbTypeAnalysis.Properties.DataSource    = Comun.ListTypeAnalysis;
                cbTypeAnalysis.Properties.ValueMember   = "Type_analisys";
                cbTypeAnalysis.Properties.DisplayMember = "Den_Type_Analysis";

                repTypeAnalysis.DataSource    = Comun.ListTypeAnalysis;
                repTypeAnalysis.ValueMember   = "Type_analisys";
                repTypeAnalysis.DisplayMember = "Den_Type_Analysis";

                // --- init: digestation
                CDigestion_methodFactory faDigestation_Method = new CDigestion_methodFactory();
                cbDigestion.Properties.DataSource    = faDigestation_Method.GetAll();
                cbDigestion.Properties.ValueMember   = "Cod_digestion_method";
                cbDigestion.Properties.DisplayMember = "Name_digestion_method";

                // --- init: element
                CElementFactory faElement = new CElementFactory();
                cbElement.Properties.DataSource    = faElement.GetAll();
                cbElement.Properties.ValueMember   = "Idelement";
                cbElement.Properties.DisplayMember = "Cod_element";

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

                // --- init: measurement unit number 1
                cbRepetition.Properties.DataSource    = Comun.ListTypeRepetition;
                cbRepetition.Properties.DisplayMember = "Name_repetition";
                cbRepetition.Properties.ValueMember   = "Cod_repetition";

                Methods oMethods = new Methods();
                gluCod_method.Properties.DataSource    = oMethods.GetAllLastVersionMethods();
                gluCod_method.Properties.DisplayMember = "Cod_template_method";
                gluCod_method.Properties.ValueMember   = "Cod_template_method";

                CReactiveFactory faReactive  = new CReactiveFactory();
                List <CReactive> lstReactive = faReactive.GetAll();

                lstReactive.Add(new CReactive()
                {
                    Idreactive = 0, Reactive_name = "---", Chemical_formula = "---"
                });

                gluCod_method.Properties.View.BestFitColumns();
            }
            catch (Exception ex)
            {
                ComunForm.Send_message(this.Text, TypeMsg.error, ex.Message);
            }
            #endregion
        }
Esempio n. 7
0
        public void Init(CGroup_solution p_group_solution)
        {
            #region inicializar metodos

            group_solution = p_group_solution;
            // --- si existe el agrupador, hacer no editable la selección de métodos
            if (group_solution.Idgroup_solution == 0)
            {
                // --- no existe agrupador
                group_solution.Flag_selected_methods = false;
                gvMethods.OptionsBehavior.Editable   = true;
                btConfirmSelMethods.Enabled          = true;
            }
            else
            {
                // --- existe agrupador
                group_solution.Flag_selected_methods = true;
                gvMethods.OptionsBehavior.Editable   = false;
                btConfirmSelMethods.Enabled          = false;
            }

            // --- show grids
            ShowGrids();

            #endregion

            #region inicializar combos
            // --- Inititalize list statusMr
            CReactiveFactory faReactive  = new CReactiveFactory();
            List <CReactive> lstReactive = faReactive.GetAll();
            lstReactive.Add(new CReactive()
            {
                Idreactive = 0, Reactive_name = "---", Chemical_formula = "---"
            });

            cbMediumHead.Properties.DataSource    = lstReactive;
            cbMediumHead.Properties.ValueMember   = "Idreactive";
            cbMediumHead.Properties.DisplayMember = "Reactive_name";

            cbModifHead.Properties.DataSource    = lstReactive;
            cbModifHead.Properties.ValueMember   = "Idreactive";
            cbModifHead.Properties.DisplayMember = "Reactive_name";

            #endregion

            #region inicializar datos según el filtro seleccionado

            // Estandares de calibración.
            if (group_solution.Type_solution == 1)
            {
                // --- recuperar cajas de textos no editables
                cbTypePattern.EditValue        = group_solution.Type_pattern;
                cbMrcOrPatternHeader.EditValue = group_solution.Idmr_detail;
                cbMediumHead.EditValue         = group_solution.Idreactive_medium;
                cbModifHead.EditValue          = group_solution.Idreactive_modif;

                // --- elemento, mr pattern, medio y modif
                //TODO
                //lstTemplate = modSolution.GetMethodsByMrcPattern(group_solution);
                gcMethods.DataSource = lstTemplate;
            }
            // Soluciones intermedias 1 y 2 y estandares de verificación.
            //else if (group_solution.Type_solution == 2
            //    || group_solution.Type_solution == 3)
            //{
            //    // recuperar cajas de textos no editables
            //    cbTypePattern.EditValue = group_solution.Type_pattern;
            //    cbMrcOrPatternHeader.EditValue = group_solution.Idmr_detail;

            //    // elemento, mr pattern, sol intermedia (1 ó 2 implicito)
            //    // getLstMethods(group_solution, type_solution_intermedia)
            //    lstTemplate = modSolution.GetMethodsBySolInterm(group_solution, );
            //    gcMethods.DataSource = lstTemplate;
            //}

            #endregion
        }
Esempio n. 8
0
        void InitData()
        {
            CReactiveFactory faReactive = new CReactiveFactory();
            List<CReactive> lstReactive = faReactive.GetAll();

            lstReactive.Add(new CReactive() { Idreactive = 0, Reactive_name = "---", Chemical_formula = "---" });

            cbMedium.Properties.DataSource = lstReactive;
            cbMedium.Properties.ValueMember = "Idreactive";
            cbMedium.Properties.DisplayMember = "Reactive_name";

            cbModif.Properties.DataSource = lstReactive;
            cbModif.Properties.ValueMember = "Idreactive";
            cbModif.Properties.DisplayMember = "Reactive_name";

            CTemplate_method_aa oTemplate_method_aa = new CTemplate_method_aa();
            CTemplate_method_aaFactory faTemplate_method_aa = new CTemplate_method_aaFactory();

            oTemplate_method_aa =
                faTemplate_method_aa.GetByPrimaryKey(new CTemplate_method_aaKeys(idtemplate_method));

            idreactive_medium = oTemplate_method_aa.Medium;
            idreactive_modif = oTemplate_method_aa.Modif;

            LstAllCalibs = oModCalibStd.GetCustomCalibStd(idelement, idmr_detail, idreactive_medium, idreactive_modif);
            gcCalibStd.DataSource = LstAllCalibs;
            gvCalibStd.ExpandAllGroups();

            //oGroup_solution = oModCalibStd.GetMethodCalib(idelement, idmr_detail, idreactive_medium, idreactive_modif);

            CElement oElement = new CElementFactory()
                .GetByPrimaryKey(new CElementKeys(Convert.ToInt16(idelement)));

            ucTraceUser1.UserSign = Comun.GetUser();
            ucTraceUser1.DateSign = Comun.GetDate();
        }
Esempio n. 9
0
 void InitData()
 {
     CReactiveFactory faReactive = new CReactiveFactory();
     cbFormula.Properties.DataSource = faReactive.GetAll();
     cbFormula.Properties.DisplayMember = "Chemical_formula";
     cbFormula.Properties.ValueMember = "Idreactive";
 }