コード例 #1
0
        protected void Desplegar_LISTA_CRONOGRAMAS()
        {
            DB_AP_CronogramaCamp ListCamp = new DB_AP_CronogramaCamp();

            GVCronogramas.DataSource = ListCamp.DB_Desplegar_LISTA_CRONOGRAMAS(Convert.ToInt32(LblIdReg.Text), "LISTA_CRONOGRAMAS");
            GVCronogramas.DataBind();
        }
コード例 #2
0
        protected void Desplegar_ACTIVIDADES_CAMP()
        {
            DB_AP_CronogramaCamp act = new DB_AP_CronogramaCamp();

            GVActividades.DataSource = act.DB_Desplegar_ACTIVIDADES_CAMP();
            GVActividades.DataBind();
        }
コード例 #3
0
        protected void Reporte_CRONOGRAMA_REGIONAL()
        {
            DB_AP_CronogramaCamp ListCamp = new DB_AP_CronogramaCamp();
            DataTable            dt       = new DataTable();

            dt = ListCamp.DB_Desplegar_LISTA_CRONOGRAMAS(Convert.ToInt32(LblIdCrono.Text), "DATOS_ROTULO");
            LblCampanhia.Text      = dt.Rows[0][0].ToString();
            LblRegional.Text       = dt.Rows[0][2].ToString();
            LblPrograma.Text       = dt.Rows[0][3].ToString();
            GVConograma.DataSource = ListCamp.DB_Desplegar_LISTA_CRONOGRAMAS(Convert.ToInt32(LblIdCrono.Text), "CRONOGRAMA");
            GVConograma.DataBind();
        }
コード例 #4
0
        protected void Registrar_CRONOGRAMA()
        {
            AP_CronogramaCamp        c   = new AP_CronogramaCamp();
            AP_CronogramaCampDetalle cd  = new AP_CronogramaCampDetalle();
            DB_AP_CronogramaCamp     reg = new DB_AP_CronogramaCamp();

            c.Id_Campanhia = Convert.ToInt32(LblIdCamp.Text);
            c.Id_Regional  = Convert.ToInt32(LblIdReg.Text);
            c.Programa     = LblPrograma.Text;
            c.Tipo         = "INICIAL";
            c.Fecha        = DateTime.Now;
            c.Estado       = "ENVIADO";
            reg.DB_Registrar_CRONOGRAMA(c);
        }
コード例 #5
0
        protected void Registrar_CRONOGRAMA_DETALLE()
        {
            DB_AP_Registro_Org       a   = new DB_AP_Registro_Org();
            AP_CronogramaCampDetalle cd  = new AP_CronogramaCampDetalle();
            DB_AP_CronogramaCamp     reg = new DB_AP_CronogramaCamp();
            string aux = "";
            bool   sw  = true;

            //cont = GVActividades.Rows.Count;
            foreach (GridViewRow dgi in GVActividades.Rows)
            {
                TextBox txini1 = (TextBox)dgi.Cells[2].Controls[1];
                TextBox txfin1 = (TextBox)dgi.Cells[3].Controls[1];
                if (txini1.Text == "" || txfin1.Text == "")
                {
                    sw  = false;
                    aux = GVActividades.Rows[dgi.RowIndex].Cells[1].Text;
                    break;
                }
            }
            if (sw == true)
            {
                Registrar_CRONOGRAMA();
                int idCrono = Convert.ToInt32(a.DB_MaxId("AP_CRONOGRAMA_CAMP", "Id_Cronograma"));
                foreach (GridViewRow d in GVActividades.Rows)
                {
                    TextBox txini = (TextBox)d.Cells[2].Controls[1];
                    TextBox txfin = (TextBox)d.Cells[3].Controls[1];
                    cd.Id_Cronograma      = idCrono;
                    cd.Id_Actividad       = Convert.ToInt32(GVActividades.Rows[d.RowIndex].Cells[0].Text);
                    cd.Numero             = d.RowIndex;
                    cd.Inicio_Planificado = Convert.ToDateTime(txini.Text);
                    cd.Final_Planificado  = Convert.ToDateTime(txfin.Text);
                    cd.Inicio_Ejecutado   = Convert.ToDateTime(txini.Text);
                    cd.Final_Ejecutado    = Convert.ToDateTime(txfin.Text);
                    cd.Observacion        = "";
                    reg.DB_Registrar_CRONOGRAMA_DETALLE(cd);
                }
            }
            else
            {
                LblMsj.Text = "No se definio una fecha para:" + " " + aux;
            }
            Response.Redirect("frmListaCronogramas.aspx");
        }