protected void cmb_mes2_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     cmb_periodo2.Items.Clear();
     cmb_periodo2.Enabled = true;
     Llenar_Periodos2();
     ModalPopupExtender_addRangDG.Show();
 }
        protected void btn_nuevo_Click(object sender, EventArgs e)
        {
            lbl_msj.Text = "";
            Label lbl_msjpopup = Panel_addRangDG.FindControl("lbl_msjpopup") as Label;

            lbl_msjpopup.Text = "";
            try
            {
                icompany = Convert.ToInt32(this.Session["companyid"]);
                sUser    = this.Session["sUser"].ToString();
                canal    = this.Session["Canal"].ToString().Trim();

                if (cmb_categoria.SelectedIndex > 0 && cmb_año2.SelectedIndex > 0 && cmb_mes2.SelectedIndex > 0 && cmb_periodo2.SelectedIndex > 0)
                {
                    Report = Convert.ToInt32(this.Session["Reporte"]);
                    int id_ReportsPlanning = Convert.ToInt32(oCoon.ejecutarDataTable("UP_WEBXPLORA_PLA_OBTENER_REPORTPLANNING_BY_REPORTID_AND_ANO_MES_AND_PERIODO", canal, Report, cmb_año2.SelectedValue, cmb_mes2.SelectedValue, cmb_periodo2.SelectedValue).Rows[0]["id_ReportsPlanning"]);
                    oCoon.ejecutarDataReader("UP_WEBXPLORA_CLIE_V2_INSERT_UPDATE_RANGO_DIASGIRO_BYPERIODO", icompany, cmb_categoria.SelectedValue, id_ReportsPlanning,
                                             txt_min2_dg_xplora.DbValue, txt_max2_dg_xplora.DbValue, txt_min2_dg_cliente.DbValue, txt_max2_dg_cliente.DbValue, sUser, DateTime.Now, sUser, DateTime.Now);

                    cmb_año.SelectedIndex = cmb_año.Items.FindItemIndexByValue(cmb_año2.SelectedValue);
                    cmb_mes.SelectedIndex = cmb_mes.Items.FindItemIndexByValue(cmb_mes2.SelectedValue);
                    Llenar_Periodos();
                    cmb_periodo.SelectedIndex = cmb_periodo.FindItemIndexByValue(cmb_periodo2.SelectedValue);
                    Cargar_gv_RangoDiasGiro();

                    lbl_msj.ForeColor = System.Drawing.Color.Green;
                    lbl_msj.Text      = "El cambio se guardo con exito";
                }
                else
                {
                    lbl_msjpopup.ForeColor = System.Drawing.Color.Red;
                    lbl_msjpopup.Text      = "* Por favor seleccione: Categoria, Año, mes y periodo";
                    ModalPopupExtender_addRangDG.Show();
                }
            }
            catch (Exception ex)
            {
                ex.Message.ToString();

                lbl_msjpopup.ForeColor = System.Drawing.Color.Red;
                lbl_msjpopup.Text      = "Ocurrió un error, intentelo más tarde. Gracias";
                ModalPopupExtender_addRangDG.Show();
            }
        }