示例#1
0
        private void FunCargaMantenimiento()
        {
            try
            {
                pnlBrenchMes.Visible = false;
                ImgExportar.Visible  = false;
                LblExportar.Visible  = false;

                dts = new ConsultaDatosDAO().FunConsultaDatos(115, int.Parse(DdlCedente.SelectedValue), int.Parse(DdlCatalogo.SelectedValue),
                                                              0, "", "", "", Session["Conectar"].ToString());
                ViewState["BrenchGestor"] = dts.Tables[0];

                GrdvBrenchGestor.DataSource = dts;
                GrdvBrenchGestor.DataBind();

                if (dts.Tables[0].Rows.Count > 0)
                {
                    pnlBrenchMes.Visible = true;
                    ImgExportar.Visible  = true;
                    LblExportar.Visible  = true;
                }

                pnlDetalleBrench.Visible   = false;
                GrdvBrenchRango.DataSource = null;
                GrdvBrenchRango.DataBind();
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }
示例#2
0
        protected void ImgVer_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                GridViewRow gvRow = (GridViewRow)(sender as Control).Parent.Parent;
                ImgVer = (ImageButton)(gvRow.Cells[9].FindControl("imgVer"));

                foreach (GridViewRow fr in GrdvBrenchGestor.Rows)
                {
                    fr.Cells[0].BackColor = System.Drawing.Color.White;
                }

                GrdvBrenchGestor.Rows[gvRow.RowIndex].Cells[0].BackColor = System.Drawing.Color.Turquoise;
                codigoGestor = int.Parse(GrdvBrenchGestor.DataKeys[gvRow.RowIndex].Values["CodigoGestor"].ToString());
                codigoBRMC   = int.Parse(GrdvBrenchGestor.DataKeys[gvRow.RowIndex].Values["CodigoBRMC"].ToString());
                dtsX         = new ConsultaDatosDAO().FunConsultaDatos(118, codigoBRMC, int.Parse(DdlCatalogo.SelectedValue), 0,
                                                                       "", "", "", Session["Conectar"].ToString());
                pnlDetalleBrench.Visible   = true;
                GrdvBrenchRango.DataSource = dtsX;
                GrdvBrenchRango.DataBind();
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }