Exemple #1
0
        private string LoopThroughEachCheckBoxAndInsertThemInToTheDataBaseBecauseNoArrays(int idDocumentacion)
        {
            for (int i = 1; i < 17; i++)
            {
                Checkbox chk = ComponentManager.Get("chkDoc" + i.ToString()) as Checkbox;

                if (chk.Checked)
                {
                    wsConsultaReportesDA.Error err = reportesDA.InsertDetDocuDA(i, idDocumentacion);

                    if (err.Valor)
                    {
                        return(err.Mensaje);
                    }
                }
            }

            return(string.Empty); //fix this bad behavior
        }