public void RetrieveTypeAnalysis()
        {
            try
            {
                InitData();

                // --- recuperate head
                if (IDTemplate_Method != null && IDTemplate_Method > 0)
                {
                    CTemplate_method_ah oTemplate_method_ah = new CTemplate_method_ah();
                    CTemplate_method_ahFactory faTemplate_method_aa = new CTemplate_method_ahFactory();
                    oTemplate_method_ah = faTemplate_method_aa.GetByPrimaryKey(new CTemplate_method_ahKeys(Convert.ToInt32(IDTemplate_Method)));

                    if (oTemplate_method_ah != null)
                    {
                        oTemplate_method_ah.Idtemplate_method = oTemplate_Method.Idtemplate_method;
                        cbUnit_result.EditValue = oTemplate_method_ah.Idunit_result;
                        tbSymbol.Text = oTemplate_method_ah.Symbol;
                        cbUnit_result.EditValue = oTemplate_method_ah.Idunit_result;
                    }
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                ComunForm.Send_message(this.Text, TypeMsg.error, ex.Message);
            }
        }
        public void RetrieveTypeAnalysis()
        {
            try
            {
                InitData();

                // --- recuperate head
                if (IDTemplate_Method != null && IDTemplate_Method > 0)
                {
                    CTemplate_method_ah        oTemplate_method_ah  = new CTemplate_method_ah();
                    CTemplate_method_ahFactory faTemplate_method_aa = new CTemplate_method_ahFactory();
                    oTemplate_method_ah = faTemplate_method_aa.GetByPrimaryKey(new CTemplate_method_ahKeys(Convert.ToInt32(IDTemplate_Method)));

                    if (oTemplate_method_ah != null)
                    {
                        oTemplate_method_ah.Idtemplate_method = oTemplate_Method.Idtemplate_method;
                        cbUnit_result.EditValue = oTemplate_method_ah.Idunit_result;
                        tbSymbol.Text           = oTemplate_method_ah.Symbol;
                        cbUnit_result.EditValue = oTemplate_method_ah.Idunit_result;
                    }
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                ComunForm.Send_message(this.Text, TypeMsg.error, ex.Message);
            }
        }
        public bool SaveTypeAnalysis(int?pIdtemplate_method)
        {
            IDTemplate_Method = pIdtemplate_method;

            if (IDTemplate_Method != null && IDTemplate_Method > 0)
            {
                CTemplate_method_ah template_method_ah = new CTemplate_method_ah();
                template_method_ah.Idtemplate_method = Convert.ToInt32(IDTemplate_Method);
                template_method_ah.Idunit_result     = Convert.ToInt16(cbUnit_result.EditValue);
                template_method_ah.Symbol            = tbSymbol.Text;

                bool result;
                if (!(result = new CTemplate_method_ahFactory().Update(template_method_ah)))
                {
                    result = new CTemplate_method_ahFactory().Insert(template_method_ah);
                }

                return(result);
            }
            return(false);
        }
        public bool SaveTypeAnalysis(int? pIdtemplate_method)
        {
            IDTemplate_Method = pIdtemplate_method;

            if (IDTemplate_Method != null && IDTemplate_Method > 0)
            {
                CTemplate_method_ah template_method_ah = new CTemplate_method_ah();
                template_method_ah.Idtemplate_method = Convert.ToInt32(IDTemplate_Method);
                template_method_ah.Idunit_result = Convert.ToInt16(cbUnit_result.EditValue);
                template_method_ah.Symbol = tbSymbol.Text;

                bool result;
                if (!(result = new CTemplate_method_ahFactory().Update(template_method_ah)))
                    result = new CTemplate_method_ahFactory().Insert(template_method_ah);

                return result;
            }
            return false;
        }