Example #1
0
        public bool SaveTypeAnalysis(int? pIdtemplate_method)
        {
            CTemplate_method_vcFactory faTemplate_method_gr = new CTemplate_method_vcFactory();
            IDTemplate_Method = pIdtemplate_method;

            if (IDTemplate_Method != null && IDTemplate_Method > 0)
            {
                bool result_template_method_aa = false;
                CTemplate_method_vc oTemplate_method_vc = new CTemplate_method_vc();

                oTemplate_method_vc.Idtemplate_method = Convert.ToInt32(IDTemplate_Method);
                oTemplate_method_vc.Weight = tbWeight.Value;
                oTemplate_method_vc.Weight_incertitude = tbWeight_incertitude.Value;
                oTemplate_method_vc.Reading_min = tbReading_min.Value;
                oTemplate_method_vc.Reading_max = tbReading_max.Value;
                oTemplate_method_vc.Reason_rep = tbReason_rep.Value;
                oTemplate_method_vc.Error_allowed = tbError_allowed.Value;
                oTemplate_method_vc.Symbol = tbSymbol.Text;
                oTemplate_method_vc.Law_limit_bottom = tbLaw_limit_bottom.Value;
                oTemplate_method_vc.Law_limit_top = tbLaw_limit_top.Value;

                oTemplate_method_vc.Num_decimal = Convert.ToInt16(tbNum_decimal.Value);
                oTemplate_method_vc.Date_allowed_error = Convert.ToDateTime(deDate_allowed_error.EditValue);

                oTemplate_method_vc.Idunit_result = Convert.ToInt16(cbUnit_result.EditValue);
                oTemplate_method_vc.Num_days = Convert.ToInt16(tbNum_days.Value);
                oTemplate_method_vc.Num_samples = Convert.ToInt16(tbNum_samples.Value);
                oTemplate_method_vc.Limit_samples = Convert.ToInt16(tbLimit_samples.Value);

                oTemplate_method_vc.Flag_mr = paMaterialReference.Enabled;
                if (paMaterialReference.Enabled)
                {
                    oTemplate_method_vc.Idmr_detail = Convert.ToInt16(cbMaterialRef.EditValue);
                    oTemplate_method_vc.Blk_max = tbBlk_max.Value;
                    oTemplate_method_vc.Reason_rep = tbReason_rep.Value;
                    oTemplate_method_vc.Reproducibility = tbReproducibility.Value;
                }

                oTemplate_method_vc.Flagblkfortify = paBlkFortification.Enabled;
                if (paBlkFortification.Enabled)
                {
                    oTemplate_method_vc.Blkfortisol = tbBlkFortiSolution.Value;
                    oTemplate_method_vc.Blkfortialiquot = tbBlkFortiAliquot.Value;
                    oTemplate_method_vc.Blkfortireproducibility = tbBlkFortiReproducibility.Value;
                }

                oTemplate_method_vc.Flagsamfortify = paSampleFortification.Enabled;
                if (paSampleFortification.Enabled)
                {
                    oTemplate_method_vc.Samfortisol = tbSamFortiSolution.Value;
                    oTemplate_method_vc.Samfortialiquot = tbSamFortiAliquot.Value;
                    oTemplate_method_vc.Samfortireproducibility = tbSamFortiReproducibility.Value;
                }

                if (!(result_template_method_aa = faTemplate_method_gr.Update(oTemplate_method_vc)))
                {
                    oTemplate_method_vc.Date_allowed_error = DateTime.Now;
                    result_template_method_aa = faTemplate_method_gr.Insert(oTemplate_method_vc);
                }

            }
            return true;
        }
Example #2
0
        public bool SaveTypeAnalysis(int?pIdtemplate_method)
        {
            CTemplate_method_vcFactory faTemplate_method_gr = new CTemplate_method_vcFactory();

            IDTemplate_Method = pIdtemplate_method;

            if (IDTemplate_Method != null && IDTemplate_Method > 0)
            {
                bool result_template_method_aa          = false;
                CTemplate_method_vc oTemplate_method_vc = new CTemplate_method_vc();

                oTemplate_method_vc.Idtemplate_method  = Convert.ToInt32(IDTemplate_Method);
                oTemplate_method_vc.Weight             = tbWeight.Value;
                oTemplate_method_vc.Weight_incertitude = tbWeight_incertitude.Value;
                oTemplate_method_vc.Reading_min        = tbReading_min.Value;
                oTemplate_method_vc.Reading_max        = tbReading_max.Value;
                oTemplate_method_vc.Reason_rep         = tbReason_rep.Value;
                oTemplate_method_vc.Error_allowed      = tbError_allowed.Value;
                oTemplate_method_vc.Symbol             = tbSymbol.Text;
                oTemplate_method_vc.Law_limit_bottom   = tbLaw_limit_bottom.Value;
                oTemplate_method_vc.Law_limit_top      = tbLaw_limit_top.Value;

                oTemplate_method_vc.Num_decimal        = Convert.ToInt16(tbNum_decimal.Value);
                oTemplate_method_vc.Date_allowed_error = Convert.ToDateTime(deDate_allowed_error.EditValue);

                oTemplate_method_vc.Idunit_result = Convert.ToInt16(cbUnit_result.EditValue);
                oTemplate_method_vc.Num_days      = Convert.ToInt16(tbNum_days.Value);
                oTemplate_method_vc.Num_samples   = Convert.ToInt16(tbNum_samples.Value);
                oTemplate_method_vc.Limit_samples = Convert.ToInt16(tbLimit_samples.Value);

                oTemplate_method_vc.Flag_mr = paMaterialReference.Enabled;
                if (paMaterialReference.Enabled)
                {
                    oTemplate_method_vc.Idmr_detail     = Convert.ToInt16(cbMaterialRef.EditValue);
                    oTemplate_method_vc.Blk_max         = tbBlk_max.Value;
                    oTemplate_method_vc.Reason_rep      = tbReason_rep.Value;
                    oTemplate_method_vc.Reproducibility = tbReproducibility.Value;
                }

                oTemplate_method_vc.Flagblkfortify = paBlkFortification.Enabled;
                if (paBlkFortification.Enabled)
                {
                    oTemplate_method_vc.Blkfortisol             = tbBlkFortiSolution.Value;
                    oTemplate_method_vc.Blkfortialiquot         = tbBlkFortiAliquot.Value;
                    oTemplate_method_vc.Blkfortireproducibility = tbBlkFortiReproducibility.Value;
                }

                oTemplate_method_vc.Flagsamfortify = paSampleFortification.Enabled;
                if (paSampleFortification.Enabled)
                {
                    oTemplate_method_vc.Samfortisol             = tbSamFortiSolution.Value;
                    oTemplate_method_vc.Samfortialiquot         = tbSamFortiAliquot.Value;
                    oTemplate_method_vc.Samfortireproducibility = tbSamFortiReproducibility.Value;
                }

                if (!(result_template_method_aa = faTemplate_method_gr.Update(oTemplate_method_vc)))
                {
                    oTemplate_method_vc.Date_allowed_error = DateTime.Now;
                    result_template_method_aa = faTemplate_method_gr.Insert(oTemplate_method_vc);
                }
            }
            return(true);
        }