Ejemplo n.º 1
0
        private void add_informe()
        {
            string add = new InformeBC().add_informe(this.txt_nombre.Text, this.txt_descripcion.Text);

            FuncionGlobal.alerta("INFORME INGRESADA CON EXITO", this.Page);
            limpiar();
            return;
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <Informe> lInforme = new InformeBC().getInforme();

                this.gr_dato.DataSource = lInforme;
                this.gr_dato.DataBind();
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            id_perfil = FuncionGlobal.FuctionDesEncriptar(Request.QueryString["id_perfil"].ToString());

            if (!IsPostBack)
            {
                List <Informe> lInforme = new InformeBC().getInformeByCliente(id_perfil);

                this.gr_dato.DataSource = lInforme;
                this.gr_dato.DataBind();
            }
        }
Ejemplo n.º 4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (valida_ingreso())
            {
                add_informe();

                List <Informe> lInforme = new InformeBC().getInforme();

                this.gr_dato.DataSource = lInforme;
                this.gr_dato.DataBind();

                limpiar();
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Usuario        musuario = new UsuarioBC().GetUsuario((string)(Session["usrname"]));
                List <Informe> lInforme = new InformeBC().getInformeByUsuario_excel(musuario.Codigoperfil.Trim());

                this.gr_dato.DataSource = lInforme;
                this.gr_dato.DataBind();

                this.txt_desde.Text = DateTime.Today.ToShortDateString();
                this.txt_hasta.Text = DateTime.Today.ToShortDateString();
            }
        }
Ejemplo n.º 6
0
        protected void ContactsGridView_RowCommand(Object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Excel")
            {
                int         index = Convert.ToInt32(e.CommandArgument);
                GridViewRow row   = gr_dato.Rows[index];

                int Id = Convert.ToInt16(this.gr_dato.DataKeys[index]["id_informe_excel"]);

                Informe minforme = new InformeBC().getinformebyid_excel(Convert.ToInt16(Id));

                carga_excel(minforme.Sp_informe.Trim(), minforme.Descripcion.Trim());
            }
        }
Ejemplo n.º 7
0
        //protected void Page_PreRender(object sender, EventArgs e)
        //{
        //    int i;
        //    GridViewRow row;
        //    ImageButton but;

        //    for (i = 0; i < gr_dato.Rows.Count; i++)
        //    {
        //        row = gr_dato.Rows[i];

        //        string id_report = gr_dato.DataKeys[i].Values[0].ToString();

        //        Informe minforme = new InformeBC().getinformebyid(Convert.ToInt16(id_report));
        //        if (row.RowType == DataControlRowType.DataRow)
        //        {

        //            but = (ImageButton)row.FindControl("ib_excel");
        //            but.Attributes.Add("onclick", "carga_excel(" + minforme.Sp_informe.Trim() + "," + minforme.Descripcion.Trim() + ");");

        //        }
        //    }
        //}

        //protected void GridViewRowEventHandler(Object sender, GridViewRowEventArgs e)
        //{

        //    if (e.Row.RowType == DataControlRowType.DataRow)
        //    {
        //        string id_report = gr_dato.DataKeys[e.Row.RowIndex].Values[0].ToString();
        //        Informe minforme = new InformeBC().getinformebyid(Convert.ToInt16(id_report));
        //        //e.Row.Cells[1].Text = "<i>" + e.Row.Cells[1].Text + "</i>";

        //        if (minforme.Sp_informe != "" && minforme.Sp_informe != null && minforme.Sp_informe.ToString().Trim() != "sp_r_nomina_general"
        //            && minforme.Sp_informe.ToString().Trim() != "sp_r_solicituddespachoescrituras" && minforme.Sp_informe.ToString().Trim() != "sp_r_infform28scotiabank")
        //        {
        //            carga_excel(minforme.Sp_informe.Trim(), minforme.Descripcion.Trim());
        //        }
        //    }

        //}

        protected void ContactsGridView_RowCommand(Object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Excel")
            {
                int         index = Convert.ToInt32(e.CommandArgument);
                GridViewRow row   = gr_dato.Rows[index];

                int Id = Convert.ToInt16(this.gr_dato.DataKeys[index]["id_informe"]);

                Informe minforme = new InformeBC().getinformebyid(Convert.ToInt16(Id));
                if (minforme.Sp_informe != "" && minforme.Sp_informe != null && minforme.Sp_informe.ToString().Trim() != "sp_r_nomina_general" &&
                    minforme.Sp_informe.ToString().Trim() != "sp_r_solicituddespachoescrituras" && minforme.Sp_informe.ToString().Trim() != "sp_r_infform28scotiabank")
                {
                    carga_excel(minforme.Sp_informe.Trim(), minforme.Descripcion.Trim());
                }
            }
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Usuario        musuario = new UsuarioBC().GetUsuario((string)(Session["usrname"]));
                List <Informe> lInforme = new InformeBC().getInformeByUsuario(musuario.Codigoperfil);

                this.gr_dato.DataSource = lInforme;
                this.gr_dato.DataBind();

                this.txt_desde.Text = DateTime.Today.ToShortDateString();
                this.txt_hasta.Text = DateTime.Today.ToShortDateString();

                FuncionGlobal.comboclientesbyusuario((string)(Session["usrname"]), this.dl_cliente);
                FuncionGlobal.combofamilia_producto(this.dl_familia);
                FuncionGlobal.comboregion(this.dl_region, "CH");
                FuncionGlobal.comboProductobyfamilia(this.dl_producto, Convert.ToInt16(this.dl_familia.SelectedValue));
            }
        }
Ejemplo n.º 9
0
        public void add_informecliente()
        {
            GridViewRow row;

            for (int i = 0; i < gr_dato.Rows.Count; i++)
            {
                Int32 id_informe = Convert.ToInt32(gr_dato.DataKeys[i].Values[0].ToString());
                row = gr_dato.Rows[i];
                CheckBox chk = (CheckBox)gr_dato.Rows[i].FindControl("chk");

                if (chk.Checked == true)
                {
                    string add = new InformeBC().add_informe_check(id_perfil, id_informe);
                    FuncionGlobal.alerta("INFORME AGREGADO CON EXITO", Page);
                }
                else
                {
                    string add = new InformeBC().del_informe_check(id_perfil, id_informe);
                }
            }
        }