Пример #1
0
        private void OptTip2_CheckedChanged(object sender, EventArgs e)
        {
            if (OptTip2.Checked == false)
            {
                return;
            }
            OptTipVal1.Checked = true;
            OptTipVal2.Enabled = false;
            OptTipVal3.Enabled = false;
            FgDatos.Cols.Count = 15;
            Cabecera2();
            funFlex.FlexMostrarDatos(FgDatos, arrCabecera2, dtLista, 2, false);
            int n_row = 0;

            b_agregando = true;
            for (n_row = 1; n_row <= FgHisAno.Rows.Count - 1; n_row++)
            {
                FgHisAno.SetData(n_row, 2, "false");
            }
            FgHisAno.SetData(FgHisAno.Rows.Count - 1, 2, "true");
            b_agregando = false;
            if (OptTip2.Checked == true)
            {
                CmdAddPro.Enabled       = true;
                CmdDelPro.Enabled       = true;
                FgPro.Cols[1].ComboList = "...";
            }
            else
            {
                CmdAddPro.Enabled       = false;
                CmdDelPro.Enabled       = false;
                FgPro.Cols[1].ComboList = "";
            }
        }
Пример #2
0
 private void FgHisAno_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
 {
     if (b_agregando == true)
     {
         return;
     }
     if ((OptTip2.Checked == true) || (OptTip3.Checked == true) || (OptTip4.Checked == true))
     {
         int n_row = 0;
         for (n_row = 1; n_row <= FgHisAno.Rows.Count - 1; n_row++)
         {
             if (n_row != FgHisAno.Row)
             {
                 FgHisAno.SetData(n_row, 2, "false");
             }
             if (n_row == FgHisAno.Row)
             {
                 FgHisAno.SetData(n_row, 2, "true");
             }
         }
     }
 }
Пример #3
0
        void ConfigurarFormulario()
        {
            DataTable dtResul = new DataTable();
            int       n_row   = 0;
            string    c_dato  = "";

            this.Height = 621;
            this.Width  = 1095;

            Sz1.Left   = 0;
            Sz1.Top    = 41;
            Sz1.Height = this.Height - 83;
            Sz1.Width  = this.Width - 18;

            this.Text = "GESTION - ANALISIS DE LAS VENTAS";

            OptTipFor1.Checked = true;

            if (OptTipFor1.Checked == true)
            {
                C_FORMATONUMERICO = C_FORMATO1;
            }
            if (OptTipFor2.Checked == true)
            {
                C_FORMATONUMERICO = C_FORMATO2;
            }

            arrCabeceraFlex1[0, 0] = "Provedor";
            arrCabeceraFlex1[0, 1] = "420";
            arrCabeceraFlex1[0, 2] = "C";
            arrCabeceraFlex1[0, 3] = "";
            arrCabeceraFlex1[0, 4] = "c_tipexides";

            arrCabeceraFlex1[1, 0] = "Id";
            arrCabeceraFlex1[1, 1] = "0";
            arrCabeceraFlex1[1, 2] = "N";
            arrCabeceraFlex1[1, 3] = "";
            arrCabeceraFlex1[1, 4] = "c_itedes";


            funFlex.FlexMostrarDatos(FgPro, arrCabeceraFlex1, dtLista, 1, false);

            arrCabeceraFlex2[0, 0] = "Item(s)";
            arrCabeceraFlex2[0, 1] = "420";
            arrCabeceraFlex2[0, 2] = "C";
            arrCabeceraFlex2[0, 3] = "";
            arrCabeceraFlex2[0, 4] = "c_tipexides";

            arrCabeceraFlex2[1, 0] = "Id";
            arrCabeceraFlex2[1, 1] = "0";
            arrCabeceraFlex2[1, 2] = "N";
            arrCabeceraFlex2[1, 3] = "";
            arrCabeceraFlex2[1, 4] = "c_itedes";

            funFlex.FlexMostrarDatos(FgItem, arrCabeceraFlex2, dtLista, 1, false);

            FgDatos.Cols.Count = 13;
            Cabecera1();
            funFlex.FlexMostrarDatos(FgDatos, arrCabecera1, dtLista, 2, false);

            OptTip1.Checked    = true;
            OptPer1.Checked    = true;
            OptSel3.Checked    = true;
            OptTipVal1.Checked = true;
            OptSelImp2.Checked = true;
            OptTipSel1.Checked = true;

            objCabecera.mysConec = mysConec;
            objCabecera.TraerDataAnos(STU_SISTEMA.EMPRESAID);                   // TRAE LOS AÑOS DE TRABAJO
            dtResul             = objCabecera.dtDataAnos;
            FgHisAno.Rows.Count = 1;
            for (n_row = 0; n_row <= dtResul.Rows.Count - 1; n_row++)
            {
                FgHisAno.Rows.Count = FgHisAno.Rows.Count + 1;
                c_dato = dtResul.Rows[n_row]["n_anotra"].ToString();
                FgHisAno.SetData(FgHisAno.Rows.Count - 1, 1, c_dato);
                FgHisAno.SetData(FgHisAno.Rows.Count - 1, 2, true);
            }
        }