コード例 #1
0
        private void Cargadatos()
        {
            Service.DataGeneral          SDG = new Service.DataGeneral();
            Service.Reporte              SDR = new Service.Reporte();
            Model.Formulacion_Cabecera   MFC = new Model.Formulacion_Cabecera();
            Service.Formulacion_Cabecera SFC = new Service.Formulacion_Cabecera();
            string strCodCentroCosto         = MyStuff.CodigoCentroCosto;

            if (MyStuff.UsaWCF == true)
            {
                this.Cbo_AñoProceso.CargaDT(objWCF.Combo_AñoProceso("000000"));
                if (string.IsNullOrEmpty(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)))
                {
                    this.Cbo_Version.CargaDT(objWCF.Combo_Version(MyStuff.AñoProceso));
                }
                else
                {
                    this.Cbo_Version.CargaDT(objWCF.Combo_Version(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)));
                }
            }
            else
            {
                this.Cbo_AñoProceso.CargaDT(SFC.Combo_AñoProceso("000000"));
                if (string.IsNullOrEmpty(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)))
                {
                    this.Cbo_Version.CargaDT(SFC.Combo_Version(MyStuff.AñoProceso));
                }
                else
                {
                    this.Cbo_Version.CargaDT(SFC.Combo_Version(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)));
                }
            }

            if (MyStuff.UsaWCF == true)
            {
                DT_Tipo_Formulacion = objWCF.Combo_TipoFormulacion().Tables[0];
                MFC         = objWCF.Recupera_FormulacionCabecera(MyStuff.AñoProceso);
                DS_Proyecto = objWCF.Ayuda_Proyecto_Spring("000000", strCodCentroCosto);
            }
            else
            {
                DT_Tipo_Formulacion = SDG.Combo_TipoFormulacion().Tables[0];
                MFC         = SFC.Recupera_FormulacionCabecera(MyStuff.AñoProceso);
                DS_Proyecto = SDG.Ayuda_Proyecto_Spring("000000", strCodCentroCosto);
            }

            this.Txt_CodProyecto.nombreDS = DS_Proyecto;
            this.cbo_CodTipoFormulacion.CargaDT(DT_Tipo_Formulacion);
        }
コード例 #2
0
        private void MostrarDataFiltro()
        {
            if (MyStuff.UsaWCF == true)
            {
                this.Cbo_AñoProceso.CargaDT(objWCF.Combo_AñoProceso("000000"));
                if (string.IsNullOrEmpty(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)))
                {
                    this.Cbo_Version.CargaDT(objWCF.Combo_Version(MyStuff.AñoProceso));
                }
                else
                {
                    this.Cbo_Version.CargaDT(objWCF.Combo_Version(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)));
                }
            }
            else
            {
                Service.Formulacion_Cabecera SFC = new Service.Formulacion_Cabecera();
                this.Cbo_AñoProceso.CargaDT(SFC.Combo_AñoProceso("000000"));
                if (string.IsNullOrEmpty(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)))
                {
                    this.Cbo_Version.CargaDT(SFC.Combo_Version(MyStuff.AñoProceso));
                }
                else
                {
                    this.Cbo_Version.CargaDT(SFC.Combo_Version(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)));
                }
            }

            if (MyStuff.UsaWCF == true)
            {
                DS_FuenteFinanciamiento = objWCF.Ayuda_FuenteFinanciamiento_Reporte("000000");
                DS_CentroCosto          = objWCF.Ayuda_CentroCosto_Reporte("");
                DS_Proyecto             = objWCF.Ayuda_Proyecto_Reporte("", "");
            }
            else
            {
                Service.DataGeneral SDG = new Service.DataGeneral();
                DS_FuenteFinanciamiento = SDG.Ayuda_FuenteFinanciamiento_Reporte("000000");
                DS_CentroCosto          = SDG.Ayuda_CentroCosto_Reporte("");
                DS_Proyecto             = SDG.Ayuda_Proyecto_Reporte("", "");
            }
            this.Txt_CodFuenteFinanciamiento.nombreDS = DS_FuenteFinanciamiento;
            this.Txt_CodCentroCosto.nombreDS          = DS_CentroCosto;
            this.Txt_CodProyecto.nombreDS             = DS_Proyecto;
            this.Opt_Grupo.CheckedIndex = 0;
        }
        public void ShowMe()
        {
            Model.Formulacion_Cabecera   MFC = new Model.Formulacion_Cabecera();
            Service.Formulacion_Cabecera SFC = new Service.Formulacion_Cabecera();

            if (MyStuff.UsaWCF == true)
            {
                MFC = objWCF.Recupera_FormulacionCabecera(MyStuff.AñoProceso);
            }
            else
            {
                MFC = SFC.Recupera_FormulacionCabecera(MyStuff.AñoProceso);
            }


            string strCodCentroCosto = MyStuff.CodigoCentroCosto;

            Service.DataGeneral SDG = new Service.DataGeneral();

            if (MyStuff.UsaWCF == true)
            {
                this.Cbo_AñoProceso.CargaDT(objWCF.Combo_AñoProceso("000000"));
                if (string.IsNullOrEmpty(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)))
                {
                    this.Cbo_Version.CargaDT(objWCF.Combo_Version(MyStuff.AñoProceso));
                }
                else
                {
                    this.Cbo_Version.CargaDT(objWCF.Combo_Version(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)));
                }
            }
            else
            {
                this.Cbo_AñoProceso.CargaDT(SFC.Combo_AñoProceso("000000"));
                if (string.IsNullOrEmpty(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)))
                {
                    this.Cbo_Version.CargaDT(SFC.Combo_Version(MyStuff.AñoProceso));
                }
                else
                {
                    this.Cbo_Version.CargaDT(SFC.Combo_Version(Convert.ToString(this.Cbo_AñoProceso.SelectedValue)));
                }
            }


            if (MyStuff.UsaWCF == true)
            {
                DS_CentroCosto = objWCF.Ayuda_Proyecto_CentroCosto(MyStuff.CodigoCentroGestor, MyStuff.DigitoCentroGestor);
                this.Txt_CodCentroCosto.nombreDS = DS_CentroCosto;
            }
            else
            {
                DS_CentroCosto = SDG.Ayuda_Proyecto_CentroCosto(MyStuff.CodigoCentroGestor, MyStuff.DigitoCentroGestor);
                this.Txt_CodCentroCosto.nombreDS = DS_CentroCosto;
            }
            if (DS_CentroCosto.Tables[0].Rows.Count > 1)
            {
                this.Txt_CodCentroCosto.Enabled = true;
            }
            else
            {
                this.Txt_CodCentroCosto.Enabled = true;
                this.Txt_CodCentroCosto.Value   = Convert.ToString(DS_CentroCosto.Tables[0].Rows[0][0]);
                this.Txt_NomCentroCosto.Value   = Convert.ToString(DS_CentroCosto.Tables[0].Rows[0][1]);
            }

            //this.ShowDialog();
        }