Example #1
0
        private void CargarTiposDePautas()
        {
            try
            {
                certificados = Certificados.ReadAll("ANOMES = '" + AnioMes + "' AND NOT IDENTIFORIGEN IS NULL ");

                ucEstado.Items.Clear();

                if (certificados.Count > 0)
                {
                    ucEstado.Items.Add("Certificado");
                }

                estimados = Estimados.ReadAll(" ANOMES = '" + AnioMes + "'");

                if (estimados.Count > 0)
                {
                    ucEstado.Items.Add("Estimado");
                }

                ordenados = Ordenados.ReadAll(" ANOMES = '" + AnioMes + "' ");

                if (ordenados.Count > 0)
                {
                    ucEstado.Items.Add("Ordenado");
                }
            }
            catch (Exception ex)
            {
                string a = ex.Message;
            }
        }
Example #2
0
        protected void btnCerrarEstimado(object sender, EventArgs e)
        {
            Business.Estimado estimado;

            //preparo parametro añomes de referencia para guardar en setUp
            int ano = Ordenados.GetAñoMesCierreEst();

            ano = Convert.ToInt32((seAño.Value).ToString() + (seMes.Value).ToString().PadLeft(2, '0'));

            try
            {
                lblMsg.Text = string.Empty;

                var estimadosCab = Estimados.ReadAll("AnoMes = " + seAño.Number.ToString("0000") + seMes.Number.ToString("00"));

                if (estimadosCab.Count > 0)
                {
                    foreach (var estimadoCab in estimadosCab)
                    {
                        if (estimadoCab.UsuCierre == string.Empty || estimadoCab.UsuCierre == null)
                        {
                            estimado = new Business.Estimado(estimadoCab.PautaId);

                            estimado.ProcesoDeCierreEstimado(((Accendo)this.Master).Usuario.UserName);

                            Ordenados.SetAñoMesCierreEst(ano, tran);

                            lblMsg.Text += "Estimado PautaId: " + estimadoCab.PautaId + ": El cierre se realizó correctamente." + "<br />";
                        }
                        else
                        {
                            lblMsg.Text += "Estimado PautaId: " + estimadoCab.PautaId + ": Ya se encontraba cerrado." + "<br />";
                        }
                    }
                }
                else
                {
                    lblMsg.Text = "No se encontraron Estimados para cerrar.";
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblMsg, ex);
            }
        }
Example #3
0
        protected void btnBuscarPauta_Click(object sender, EventArgs e)
        {
            try
            {
                var estimadoCab = Estimados.Buscar(txNroPauta.Text.Trim());

                if (estimadoCab != null)
                {
                    Response.Redirect("EstimadoAnulacionReemplazo.aspx?Estimado.RecId=" + estimadoCab.RecId.ToString(), true);
                }
                else
                {
                    lblMsg.Text = "No existe Pauta Estimada.";
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblMsg, ex);
            }
        }
Example #4
0
        protected void btnBuscarEspacioPeriodo_Click(object sender, EventArgs e)
        {
            try
            {
                var estimadoCab = Estimados.Buscar((string)ucIdentifEspacio.SelectedValue, Convert.ToInt32(seAño.Value), Convert.ToInt32(seMes.Value));

                if (estimadoCab != null)
                {
                    Response.Redirect("EstimadoAnulacionReemplazo.aspx?Estimado.RecId=" + estimadoCab.RecId.ToString(), true);
                }
                else
                {
                    lblMsg.Text = "No existe Pauta Estimada.";
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblMsg, ex);
            }
        }