Esempio n. 1
0
        private void ucFrecuenciaChanged()
        {
            if (ucIdentifFrecuencia.SelectedValue != null)
            {
                DTO.FrecuenciaDTO frecuencia = CRUDHelper.Read(string.Format("IdentifFrecuencia = '{0}'", ucIdentifFrecuencia.SelectedValue), BusinessMapper.GetDaoByEntity(BusinessMapper.eEntities.Frecuencia));

                trDia.Visible       = (frecuencia.SemMes.Trim().ToUpper() == MES);
                trDiaSemana.Visible = (frecuencia.SemMes.Trim().ToUpper() == SEMANA);
            }
            else
            {
                trDia.Visible       = false;
                trDiaSemana.Visible = false;
            }

            if (!trDia.Visible)         //Si no se muestra, va en NULL.
            {
                spDia.Value = null;
            }

            if (!trDiaSemana.Visible)   //Si no se muestra, va en NULL.
            {
                clDiaSemana.SelectedItem = null;
            }
        }
Esempio n. 2
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string err = string.Empty;

            try
            {
                if (Valid(out err))
                {
                    var entity = new DTO.FrecuenciaDTO();
                    FormsHelper.FillEntity(tblControls, entity);

                    Business.Frecuencias.Create(entity, Detalles);

                    pnlControls.Visible = false;
                    RefreshGrid(gv);
                }
                else
                {
                    throw new Exception(err);
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblError, ex);
            }
        }
Esempio n. 3
0
        public static bool ValidaEliminacionFrecuencia(DTO.FrecuenciaDTO theFrecuenciaDTO, ref DataTable pobjDatatable)
        {
            bool retorno = false;

            YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper();
            wobjSQLHelper.SetParametro("@idFrecuencia", SqlDbType.VarChar, 20, theFrecuenciaDTO.IdFrecuencia);

            try
            {
                //====================================================================================
                if (wobjSQLHelper.Ejecutar("validaEliminacionFrecuencia", "YouCom", pobjDatatable) <= 0)
                {
                    retorno = false;
                }
                else
                {
                    retorno = true;
                }
            }
            catch (Exception eobjException)
            {
                throw eobjException;
            }
            return(retorno);
        }
Esempio n. 4
0
        public static bool Update(DTO.FrecuenciaDTO myFrecuenciaDTO)
        {
            bool resultado = FrecuenciaDAL.Update(myFrecuenciaDTO);

            return(resultado);
        }
Esempio n. 5
0
        public static bool Insert(DTO.FrecuenciaDTO myFrecuenciaDTO)
        {
            bool resultado = FrecuenciaDAL.Insert(myFrecuenciaDTO);

            return(resultado);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string err = string.Empty;

            try
            {
                if (Valid(out err))
                {
                    var entity = new DTO.FrecuenciaDTO();
                    FormsHelper.FillEntity(tblControls, entity);

                    Business.Frecuencias.Create(entity, Detalles);

                    pnlControls.Visible = false;
                    RefreshGrid(gv);
                }
                else
                {
                    throw new Exception(err);
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblError, ex);
            }
        }