示例#1
0
        void Traduce()
        {
            LblSubTitulo.Text         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "82");
            LblNombres.InnerText      = ClTraductor.BuscaString(Session["Idioma"].ToString(), "87");
            LblDireccion.InnerText    = ClTraductor.BuscaString(Session["Idioma"].ToString(), "47");
            LblPais.InnerText         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "48");
            LblDepartamento.InnerText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "49");
            LblMunicipio.InnerText    = ClTraductor.BuscaString(Session["Idioma"].ToString(), "50");
            LblTelCasa.InnerText      = ClTraductor.BuscaString(Session["Idioma"].ToString(), "51");
            LblFotoLogo.InnerText     = ClTraductor.BuscaString(Session["Idioma"].ToString(), "88");
            BtnGrabar.Text            = ClTraductor.BuscaString(Session["Idioma"].ToString(), "71");

            //Combos
            ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Pais(Session["Idioma"].ToString()), CboPais, "Id", "Datos");
            ClUtilitarios.AgregarSeleccioneCombo(CboPais, ClTraductor.BuscaString(Session["Idioma"].ToString(), "48"), Session["Idioma"].ToString());
            CboMunicipio.Items.Clear();
            CboDepartamento.Items.Clear();

            GrdDetalle.Columns[1].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "43");
            GrdDetalle.Columns[2].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "47");
            GrdDetalle.Columns[3].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "93");
            GrdDetalle.Rebind();
            BtnGrabar.Attributes["data-loading-text"] = ClTraductor.BuscaString(Session["Idioma"].ToString(), "94");
            TxtFotoPerfil.Localization.Select         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "96");
            TxtFotoPerfil.Localization.Cancel         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "98");
            TxtFotoPerfil.Localization.Remove         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "97");
        }
示例#2
0
 void Grabar()
 {
     if (Valida() == true)
     {
         int ClinicaId = 0;
         if (TxtClinicaId.Text == "")
         {
             ClinicaId = ClClinica.Get_Max_Clinica();
             ClClinica.Insert_Clinica(ClinicaId, Convert.ToInt32(Session["ClienteId"]), TxtNombre.Value, TxtDireccion.Value, Convert.ToInt32(CboMunicipio.SelectedValue), TxtTelCasa.Value);
             ClUsuario.Insert_Relacion_Usuario_Clinica(Convert.ToInt32(Session["UsuarioId"]), ClinicaId);
         }
         else
         {
             ClinicaId = Convert.ToInt32(TxtClinicaId.Text);
             ClClinica.Modificar_Clinca(ClinicaId, TxtNombre.Value, TxtDireccion.Value, Convert.ToInt32(CboMunicipio.SelectedValue), TxtTelCasa.Value);
         }
         if (TxtFotoPerfil.UploadedFiles.Count > 0)
         {
             Stream fileStream      = TxtFotoPerfil.UploadedFiles[0].InputStream;
             byte[] attachmentBytes = new byte[fileStream.Length];
             fileStream.Read(attachmentBytes, 0, Convert.ToInt32(fileStream.Length));
             ClClinica.Insert_Foto_Clinica(ClinicaId, attachmentBytes, TxtFotoPerfil.UploadedFiles[0].ContentType, TxtFotoPerfil.UploadedFiles[0].FileName);
             fileStream.Close();
         }
         Limpiar();
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Popup", "ShowPopup('', '" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "76") + "','success','" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "9") + "');", true);
         GrdDetalle.Rebind();
         ValidaGrabar();
         VerificaClnica();
     }
 }
        protected void BindConsingnacion()
        {
            DataTable DT = new DataTable();

            Cnx.SelecBD();
            using (SqlConnection sqlConB = new SqlConnection(Cnx.GetConex()))
            {
                string VbTxtSql = "SP_PANTALLA_Sal_consignacion 1,@Bod, @Us,'','',0,0,0, @ICC,'01-1-2009','01-01-1900','01-01-1900'";
                sqlConB.Open();
                using (SqlCommand SC = new SqlCommand(VbTxtSql, sqlConB))
                {
                    SC.Parameters.AddWithValue("@Bod", DdlBodega.Text.Trim());
                    SC.Parameters.AddWithValue("@Us", Session["C77U"]);
                    SC.Parameters.AddWithValue("@ICC", Session["!dC!@"]);
                    using (SqlDataAdapter SDA = new SqlDataAdapter())
                    {
                        SDA.SelectCommand = SC;
                        SDA.Fill(DT);
                        if (DT.Rows.Count > 0)
                        {
                            GrdDetalle.DataSource = DT; GrdDetalle.DataBind(); BtnEntregar.Enabled = true;
                        }
                        else
                        {
                            GrdDetalle.DataSource = null; GrdDetalle.DataBind(); BtnEntregar.Enabled = false;
                        }                                                                                         /**/
                    }
                }
            }
        }
示例#4
0
    protected void btnActualiza_Click(object sender, EventArgs e)
    {
        lblError.Text = "";
        Button boton = (Button)sender;

        string[] argumentos = boton.CommandArgument.ToString().Split(new char[] { ';' });
        string   estatus    = "A";

        if (argumentos[1] == "A")
        {
            estatus = "F";
        }
        else
        {
            estatus = "A";
        }
        Inventario orden = new Inventario();

        object[] actualizado = orden.actualizaEstatus(Convert.ToInt32(argumentos[0]), Convert.ToInt32(ddlIslas.SelectedValue), estatus);
        if (Convert.ToBoolean(actualizado[0]))
        {
            GridFactPend.DataBind();
            GrdDetalle.DataBind();
        }
        else
        {
            lblError.Text = "Error: " + Convert.ToString(actualizado[1]);
        }
    }
示例#5
0
 private void BtnGrabar_Click(object sender, EventArgs e)
 {
     if (Valida() == true)
     {
         if (TxtUsuarioId.Text == "")
         {
             int PersonaId     = ClPersona.Get_Max_Persona();
             int UniversidadId = 0;
             ClPersona.Insert_Persona(PersonaId, Convert.ToInt32(CboAlias.SelectedValue), TxtNombres.Value, TxtApellidos.Value, Convert.ToInt32(CboGenero.SelectedValue), TxtIdNo.Value, TxtDireccion.Value, Convert.ToInt32(CboMunicipio.SelectedValue), TxtTelCasa.Value, TxtTelMovil.Value, UniversidadId, "", "", Convert.ToDateTime(TxtFecNac.Value));
             int    UsuarioId = ClUsuario.Get_Max_Usuario();
             string Clave     = ClUtilitarios.Encrypt(ClUtilitarios.GenerarPass(6, 10), true);
             ClUsuario.Insert_Usuario(UsuarioId, Convert.ToInt32(Session["ClienteId"]), Convert.ToInt32(CboTipoUsuario.SelectedValue), TxtCorreo.Value, Clave, PersonaId);
             ClUsuario.Create_Permisos(UsuarioId, Convert.ToInt32(CboTipoUsuario.SelectedValue));
             string Asunto  = ClTraductor.BuscaString(Session["Idioma"].ToString(), "91");
             string Mensaje = Mensaje = "<body><table><tr><td>" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "92") + " " + TxtCorreo.Value + " " + ClTraductor.BuscaString(Session["Idioma"].ToString(), "21") + " " + Clave + "</td></tr></table>";
             ClUtilitarios.EnvioCorreo(TxtCorreo.Value, TxtNombres.Value + " " + TxtApellidos.Value, Asunto, Mensaje, 0, "", "");
             Limpiar();
             ClUsuario.Insert_Relacion_Usuario_Clinica(UsuarioId, Convert.ToInt32(Session["ClinicaId"]));
             ScriptManager.RegisterStartupScript(this, this.GetType(), "Popup", "ShowPopup('', '" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "76") + "','success','" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "9") + "');", true);
             GrdDetalle.Rebind();
         }
         else
         {
             int UsuarioId = Convert.ToInt32(TxtUsuarioId.Text);
             int PersonaId = Convert.ToInt32(TxtPersonaId.Text);
             ClUsuario.Update_DatosUsuario(2, UsuarioId, TxtCorreo.Value, "", Convert.ToInt32(CboTipoUsuario.SelectedValue));
             ClPersona.Update_Persona(PersonaId, Convert.ToInt32(CboAlias.SelectedValue), TxtNombres.Value, TxtApellidos.Value, Convert.ToInt32(CboGenero.SelectedValue), TxtIdNo.Value, TxtDireccion.Value, Convert.ToInt32(CboMunicipio.SelectedValue), TxtTelCasa.Value, TxtTelMovil.Value, 0, "", "", Convert.ToDateTime(TxtFecNac.Value));
             Limpiar();
             ClUsuario.Insert_Relacion_Usuario_Clinica(UsuarioId, Convert.ToInt32(Session["ClinicaId"]));
             ScriptManager.RegisterStartupScript(this, this.GetType(), "Popup", "ShowPopup('', '" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "76") + "','success','" + ClTraductor.BuscaString(Session["Idioma"].ToString(), "9") + "');", true);
             GrdDetalle.Rebind();
         }
     }
     ValidaGrabar();
 }
        private void BtnGrabar_Click(object sender, EventArgs e)
        {
            int     UsuarioId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["Benutzer"].ToString()), true));
            DataSet ds        = ClUsuario.GetDatosUsuarioId(UsuarioId, Session["Idioma"].ToString());
            int     PersonaId = Convert.ToInt32(ds.Tables["Datos"].Rows[0]["PersonaId"]);

            ClPersona.Insert_Especialidad(PersonaId, Convert.ToInt32(CboEspecialidad.SelectedValue));
            ds.Clear();
            GrdDetalle.Rebind();
            Traduce();
        }
 protected void DdlBodega_TextChanged(object sender, EventArgs e)
 {
     if (DdlBodega.Text.Trim().Equals(""))
     {
         BtnEntregar.Enabled = false; GrdDetalle.DataSource = null; GrdDetalle.DataBind();
     }
     else
     {
         BtnEntregar.Enabled = true; BindConsingnacion();
     }
 }
示例#8
0
        protected void BindDBodg(string CodB, string Accion)
        {
            Idioma = (DataTable)ViewState["TablaIdioma"];
            DataRow[] Result;
            if (Accion.Equals("UPD"))
            {
                Cnx.SelecBD();
                using (SqlConnection sqlCon = new SqlConnection(Cnx.GetConex()))
                {
                    string VbTxtSql = "EXEC SP_PANTALLA_Bodega 2, '','','','WEB',0,0,0,@ICC,'01-1-2009','01-01-1900','01-01-1900'";
                    sqlCon.Open();
                    using (SqlCommand SC = new SqlCommand(VbTxtSql, sqlCon))
                    {
                        SC.Parameters.AddWithValue("@ICC", Session["!dC!@"]);

                        SqlDataAdapter SDA = new SqlDataAdapter();
                        SDA.SelectCommand = SC;
                        SDA.Fill(DTDet);
                        ViewState["DTDet"] = DTDet;
                    }
                }
            }
            DTDet = (DataTable)ViewState["DTDet"];
            DataTable DT = new DataTable();

            DT     = DTDet.Clone();
            Result = DTDet.Select("CodBodega = '" + CodB.Trim() + "'");
            foreach (DataRow DR in Result)
            {
                DT.ImportRow(DR);
            }
            if (DT.Rows.Count > 0)
            {
                DataView DV = DT.DefaultView;
                DV.Sort = "Columna,Fila";
                DT      = DV.ToTable();
                GrdDetalle.DataSource = DT;
                GrdDetalle.DataBind();
            }
            else
            {
                DT.Rows.Add(DT.NewRow());
                GrdDetalle.DataSource = DT;
                GrdDetalle.DataBind();
                GrdDetalle.Rows[0].Cells.Clear();
                GrdDetalle.Rows[0].Cells.Add(new TableCell());
                Result = Idioma.Select("Objeto= 'SinRegistros'");
                foreach (DataRow row in Result)
                {
                    GrdDetalle.Rows[0].Cells[0].Text = row["Texto"].ToString();
                }
                GrdDetalle.Rows[0].Cells[0].HorizontalAlign = HorizontalAlign.Center;
            }
        }
 private void GrdDetalle_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
 {
     if (e.CommandName == "CmdQuitar")
     {
         int     UsuarioId = Convert.ToInt32(ClUtilitarios.Decrypt(HttpUtility.UrlDecode(Request.QueryString["Benutzer"].ToString()), true));
         DataSet ds        = ClUsuario.GetDatosUsuarioId(UsuarioId, Session["Idioma"].ToString());
         int     PersonaId = Convert.ToInt32(ds.Tables["Datos"].Rows[0]["PersonaId"]);
         ds.Clear();
         ClPersona.Delete_Especialidad(PersonaId, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EspecialidadId"].ToString()));
         GrdDetalle.Rebind();
         Traduce();
     }
 }
示例#10
0
 void Traduce()
 {
     LblSubTitulo.Text = ClTraductor.BuscaString(Session["Idioma"].ToString(), "99");
     LblUsuarioE.Text  = ClTraductor.BuscaString(Session["Idioma"].ToString(), "1") + ":";
     GrdDetalle.Columns[2].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "87");
     GrdDetalle.Columns[3].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "1");
     GrdDetalle.Columns[4].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "59");
     GrdDetalle.Columns[5].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "89");
     GrdDetalle.Columns[6].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "99");
     GrdDetalle.Rebind();
     GrdPErmisos.Columns[1].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "100");
     GrdPErmisos.Columns[3].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "101");
     GrdPErmisos.Columns[5].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "102");
     GrdPErmisos.Columns[7].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "93");
     GrdPErmisos.Columns[9].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "103");
     GrdPErmisos.Rebind();
 }
示例#11
0
        protected void DdlPpt_TextChanged(object sender, EventArgs e)
        {
            if (DdlPpt.Text.Trim().Equals("0"))
            {
                BtnIngresar.Enabled = false; LblCliente.Text = "";
            }

            DataTable DT = new DataTable();

            Cnx.SelecBD();
            using (SqlConnection sqlConB = new SqlConnection(Cnx.GetConex()))
            {
                string VbTxtSql = "EXEC SP_PANTALLA_PropuestaEntregaElem 4,@Us,'','','',@PT,0,@ICC,0,'01-1-2009','01-01-1900','01-01-1900'";
                sqlConB.Open();
                using (SqlCommand SC = new SqlCommand(VbTxtSql, sqlConB))
                {
                    SC.Parameters.AddWithValue("@Us", Session["C77U"]);
                    SC.Parameters.AddWithValue("@ICC", Session["!dC!@"]);
                    SC.Parameters.AddWithValue("@PT", DdlPpt.Text.Trim());
                    using (SqlDataAdapter SDA = new SqlDataAdapter())
                    {
                        SDA.SelectCommand = SC;
                        SDA.Fill(DT);
                        if (DT.Rows.Count > 0)
                        {
                            GrdDetalle.DataSource = DT; GrdDetalle.DataBind(); BtnIngresar.Enabled = true;
                            DSTDdl = (DataSet)ViewState["DSTDdl"];
                            DataRow[] Result = DSTDdl.Tables[0].Select("IdPropuesta=" + DdlPpt.Text.Trim());
                            foreach (DataRow Row in Result)
                            {
                                ViewState["CodTercero"] = Row["CodTercero"].ToString().Trim();
                                LblCliente.Text         = "[" + Row["CodTercero"].ToString().Trim() + "] - [" + Row["RazonSocial"].ToString().Trim() + "]";
                            }
                        }
                        else
                        {
                            GrdDetalle.DataSource = null; GrdDetalle.DataBind(); BtnIngresar.Enabled = false; LblCliente.Text = "";
                        }
                    }
                }
            }
        }
示例#12
0
        void Traduce()
        {
            DivErrr.Visible           = false;
            DivNoErr.Visible          = false;
            LblSubTitulo.Text         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "104");
            LblAlias.InnerText        = ClTraductor.BuscaString(Session["Idioma"].ToString(), "42");
            LblNombres.InnerText      = ClTraductor.BuscaString(Session["Idioma"].ToString(), "43");
            LblApellidos.InnerText    = ClTraductor.BuscaString(Session["Idioma"].ToString(), "44");
            LblGenero.InnerText       = ClTraductor.BuscaString(Session["Idioma"].ToString(), "45");
            LblId.InnerText           = ClTraductor.BuscaString(Session["Idioma"].ToString(), "46");
            LblDireccion.InnerText    = ClTraductor.BuscaString(Session["Idioma"].ToString(), "47");
            LblPais.InnerText         = ClTraductor.BuscaString(Session["Idioma"].ToString(), "48");
            LblDepartamento.InnerText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "49");
            LblMunicipio.InnerText    = ClTraductor.BuscaString(Session["Idioma"].ToString(), "50");
            LblTelCasa.InnerText      = ClTraductor.BuscaString(Session["Idioma"].ToString(), "51");
            LblTelMovil.InnerText     = ClTraductor.BuscaString(Session["Idioma"].ToString(), "52");
            LblCorreo.InnerText       = ClTraductor.BuscaString(Session["Idioma"].ToString(), "59");
            LblFecNac.InnerText       = ClTraductor.BuscaString(Session["Idioma"].ToString(), "60");
            BtnGrabar.Text            = ClTraductor.BuscaString(Session["Idioma"].ToString(), "71");
            lblTipoUsuario.InnerText  = ClTraductor.BuscaString(Session["Idioma"].ToString(), "89");

            //Combos
            ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Alias(Session["Idioma"].ToString(), 2), CboAlias, "Id", "Datos");
            ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Genero(Session["Idioma"].ToString()), CboGenero, "Id", "Datos");
            ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Pais(Session["Idioma"].ToString()), CboPais, "Id", "Datos");
            ClUtilitarios.AgregarSeleccioneCombo(CboPais, ClTraductor.BuscaString(Session["Idioma"].ToString(), "48"), Session["Idioma"].ToString());
            CboMunicipio.Items.Clear();
            CboDepartamento.Items.Clear();
            ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_TipoUsuario(Session["Idioma"].ToString(), 2), CboTipoUsuario, "Id", "Datos");
            ClUtilitarios.AgregarSeleccioneCombo(CboTipoUsuario, ClTraductor.BuscaString(Session["Idioma"].ToString(), "89"), Session["Idioma"].ToString());
            TxtIdioma.Value = Session["Idioma"].ToString();
            GrdDetalle.Columns[2].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "43");
            GrdDetalle.Columns[3].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "84");
            GrdDetalle.Columns[4].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "59");
            GrdDetalle.Columns[5].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "89");
            GrdDetalle.Columns[6].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "93");
            GrdDetalle.Columns[8].HeaderText = ClTraductor.BuscaString(Session["Idioma"].ToString(), "105");
            GrdDetalle.Rebind();
            BtnGrabar.Attributes["data-loading-text"] = ClTraductor.BuscaString(Session["Idioma"].ToString(), "94");
        }
        //************************ GridView Detalle ******************************
        protected void BindDDetTmp()
        {
            TblDetalle = (DataTable)ViewState["TblDetalle"];
            int VbNumReg = TblDetalle.Rows.Count;

            TblDetalle.AcceptChanges();
            foreach (DataRow row in TblDetalle.Rows)
            {
                object value = row["CodBodega"];
                if (value == DBNull.Value)
                {
                    if (VbNumReg > 1)
                    {
                        row.Delete(); BtnIngresar.Enabled = true;
                    }
                }
            }
            TblDetalle.AcceptChanges();

            if (TblDetalle.Rows.Count > 0)
            {
                GrdDetalle.DataSource = TblDetalle; GrdDetalle.DataBind();
            }
            else
            {
                TblDetalle.Rows.Add(TblDetalle.NewRow());
                GrdDetalle.DataSource = TblDetalle;
                GrdDetalle.DataBind();
                GrdDetalle.Rows[0].Cells.Clear();
                GrdDetalle.Rows[0].Cells.Add(new TableCell());
                GrdDetalle.Rows[0].Cells[0].Text            = "Empty..!";
                GrdDetalle.Rows[0].Cells[0].HorizontalAlign = HorizontalAlign.Center;
                BtnIngresar.Enabled = false;
                TblDetalle.NewRow();
                GrdDetalle.DataSource = TblDetalle;
                GrdDetalle.DataBind();
            }
        }
示例#14
0
 protected void GridFactPend_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     lblError.Text = "";
     GrdDetalle.DataBind();
 }
示例#15
0
 protected void ddlEstatus_SelectedIndexChanged(object sender, EventArgs e)
 {
     lblError.Text = "";
     GridFactPend.DataBind();
     GrdDetalle.DataBind();
 }
示例#16
0
 void GrdSolicitudes_ItemCommand(object sender, GridCommandEventArgs e)
 {
     if (e.CommandName == "CmdVer")
     {
         if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ModuloId"].ToString() == "3")
         {
             int Actividad = ClGestion.Get_Actividad_RegistroId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString()));
             if ((Actividad == 1) || (Actividad == 2) || (Actividad == 3) || (Actividad == 16))
             {
                 DataSet          ds             = ClGestion.Formulario_Profesional(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]));
                 Ds_Profesionales Ds_Inscripcion = new Ds_Profesionales();
                 Ds_Inscripcion.Tables["Dt_Formulario"].Clear();
                 DataRow row = Ds_Inscripcion.Tables["Dt_Formulario"].NewRow();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Copia legalizada del título;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU); y  \n3) Copia de documento personal de identificación (DPI).";
                 }
                 else if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "2")
                 {
                     row["Requisitos"] = "Requisitos:\n1) Constancia original de colegiado activo vigente;  \n2) Constancia de inscripción en el Registro Tributario Unificado (RTU);   y \n3) Copia de documento personal de identificación (DPI).\nPara profesionales con post grado en materia forestal, presentar el documento extendido por la universidad que lo avala.";
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["Requisitos"] = row["Requisitos"] + "\nademás de los requisitos anteriores, copia del diploma de aprobación del curso correspondiente.";
                 }
                 row["Region"]    = ds.Tables["Datos"].Rows[0]["region"].ToString();
                 row["SubRegion"] = ds.Tables["Datos"].Rows[0]["Subregion"].ToString();
                 row["NUG"]       = ds.Tables["Datos"].Rows[0]["NUG"].ToString();
                 row["Fecha"]     = ds.Tables["Datos"].Rows[0]["Fecha_Gestion"].ToString();
                 row["Actividad"] = ds.Tables["Datos"].Rows[0]["Nombre_Subcategoria"].ToString();
                 row["Nombres"]   = ds.Tables["Datos"].Rows[0]["Nombres"].ToString();
                 row["Apellidos"] = ds.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                 row["DPI"]       = ds.Tables["Datos"].Rows[0]["DPI"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "")
                 {
                     row["NIT"] = "";
                 }
                 else
                 {
                     row["NIT"] = ds.Tables["Datos"].Rows[0]["NIT"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["telefono"].ToString() == "")
                 {
                     row["Telefono"] = "";
                 }
                 else
                 {
                     row["Telefono"] = ds.Tables["Datos"].Rows[0]["telefono"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["celular"].ToString() == "")
                 {
                     row["Celular"] = "";
                 }
                 else
                 {
                     row["Celular"] = ds.Tables["Datos"].Rows[0]["celular"].ToString();
                 }
                 row["Correo"]             = ds.Tables["Datos"].Rows[0]["Correo"].ToString();
                 row["Direccion"]          = ds.Tables["Datos"].Rows[0]["Direccion"].ToString();
                 row["Municipio"]          = ds.Tables["Datos"].Rows[0]["MunVivienda"].ToString();
                 row["Departamento"]       = ds.Tables["Datos"].Rows[0]["DepaVivienda"].ToString();
                 row["CategoriaProfesion"] = ds.Tables["Datos"].Rows[0]["CategoriaProfesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["CategoriaProfesionId"].ToString() == "1")
                 {
                     row["No_Colegiado"] = "---------------";
                 }
                 else
                 {
                     row["No_Colegiado"] = ds.Tables["Datos"].Rows[0]["No_Colegiado"].ToString();
                 }
                 if (ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "1" || ds.Tables["Datos"].Rows[0]["SubCategoriaId"].ToString() == "16")
                 {
                     row["No_Diploma"] = ds.Tables["Datos"].Rows[0]["No_Diploma"].ToString();
                 }
                 else
                 {
                     row["No_Diploma"] = "-----------------";
                 }
                 row["Direccion_Notifica"] = ds.Tables["Datos"].Rows[0]["Direccion_Notificacion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString() == "")
                 {
                     row["Aldea_Notifica"] = "";
                 }
                 else
                 {
                     row["Aldea_Notifica"] = ds.Tables["Datos"].Rows[0]["Aldea_Notificacion"].ToString();
                 }
                 row["Municipio_Notifica"]    = ds.Tables["Datos"].Rows[0]["MunNotifica"].ToString();
                 row["Departamento_Notifica"] = ds.Tables["Datos"].Rows[0]["DepNotifica"].ToString();
                 row["Observaciones"]         = ds.Tables["Datos"].Rows[0]["Observaciones"].ToString();
                 row["Nombre"]    = ds.Tables["Datos"].Rows[0]["Nombre_Firma"].ToString();
                 row["Profesion"] = ds.Tables["Datos"].Rows[0]["Profesion"].ToString();
                 if (ds.Tables["Datos"].Rows[0]["Origen_PersonaId"].ToString() == "1")
                 {
                     row["LabelId"] = "2.3 Número de DPI:";
                 }
                 else
                 {
                     row["LabelId"] = "2.3 Número de Pasaporte:";
                 }
                 Ds_Inscripcion.Tables["Dt_Formulario"].Rows.Add(row);
                 ds.Tables.Clear();
                 Session["DataFormulario"] = Ds_Inscripcion;
                 RadWindow1.Title          = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl    = "~/WeForms_Reportes/Wfrm_RepFormularioProfesional.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("0", true)) + "&traite=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("00", true)) + "";
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
             }
             else if ((Actividad == 4) || (Actividad == 5) || (Actividad == 19) || (Actividad == 20) || (Actividad == 21))
             {
                 Session["Ds_Formulario_Plantacion_Voluntaria"] = ClGestion.ImpresionFormularioPlantacionVoluntaria(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 1);
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioPlantacion.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("1", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "";
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
             }
             else if (Actividad == 18)
             {
                 Session["Ds_Formulario_Plantacion_Voluntaria"] = ClGestion.ImpresionFormularioPlantacionVoluntaria(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 2);
                 RadWindow1.Title       = "Formulario de Inscripción";
                 RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepFormularioPlantacion.aspx?appel=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("1", true)) + "&traite=" + HttpUtility.UrlEncode(Request.QueryString["traite"]) + "";
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
             }
         }
     }
     else if (e.CommandName == "CmdSolComple")
     {
         TxtGestionId.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString();
         GrdDetalle.Rebind();
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindowDetalle.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocAceptacion")
     {
         RadWindow1.Title = "Constancia de Admisión de Expediente";
         string Admision_GestionId = ClGestion.Get_DocumentoId(1, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         string SubCategoria       = ClGestion.Get_SubCategoria_Gestion(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepConstanciaAdmisionExp.aspx?gestion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(Admision_GestionId, true)) + "&subcategoria=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoria.ToString(), true)) + "";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocProvidencia")
     {
         RadWindow1.Title = "Providencia para traslado de Expediente";
         string  ProvidenciaId    = ClGestion.Get_DocumentoId(2, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosProvidencia = ClGestion.ImpresionProvidenciaGestion(2, Convert.ToInt32(ProvidenciaId), "", "", Convert.ToInt32(Session["UsuarioId"]), 0);
         Session["DatosProvidencia"] = DatosProvidencia;
         RadWindow1.NavigateUrl      = "~/WeForms_Reportes/Wfrm_RepProvidenciaTrasladoExp.aspx";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocJurudico")
     {
         RadWindow1.Title = "Dictamen Juridico";
         string  Dictamen_Juridico_Id = ClGestion.Get_DocumentoId(3, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet dsTemp = new DataSet();
         DataSet DatosDictamenJuridico = ClGestion.ImpresionDictamenJuridicoGestion(2, Convert.ToInt32(Dictamen_Juridico_Id), 0, "", "", "", "", "", 0, "", "", "", dsTemp, "");
         Session["DatosDictamenJuridico"] = DatosDictamenJuridico;
         RadWindow1.NavigateUrl           = "~/WeForms_Reportes/Wfrm_RepDictamenJuridico.aspx";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocResolucion")
     {
         RadWindow1.Title = "Resolución de Aprobación de Inscripción";
         string  ResolucionId    = ClGestion.Get_DocumentoId(4, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosResolucion = ClGestion.ImpresionResolucion_Aprobacion(2, Convert.ToInt32(ResolucionId), Convert.ToInt32(Session["UsuarioId"]), 0);
         Session["DatosResolucion"] = DatosResolucion;
         RadWindow1.NavigateUrl     = "~/WeForms_Reportes/Wfrm_RepResolucionAprobacion.aspx";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocEnmiendas")
     {
         RadWindow1.Title = "Oficio de enmiendas jurídicas";
         string  OficioEnmiendaId     = ClGestion.Get_DocumentoId(5, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosOficioEnmiendas = ClGestion.ImpresionOficioEnmiendasJuridico(2, Convert.ToInt32(OficioEnmiendaId), Convert.ToInt32(Session["UsuarioId"]));
         Session["DatosOficioEnmiendasJuridico"] = DatosOficioEnmiendas;
         RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepOficioEnmiendaJuridica.aspx";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocOficioDev")
     {
         RadWindow1.Title = "Oficio de Devolución";
         string  OficioDevolucionId    = ClGestion.Get_DocumentoId(6, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet dsTemp                = new DataSet();
         DataSet DatosOficioDevolucion = ClGestion.ImpresionOficioDevolucion(2, Convert.ToInt32(OficioDevolucionId), 0, dsTemp, "", 0, 0);
         Session["DatosOficioDevolucion"] = DatosOficioDevolucion;
         RadWindow1.NavigateUrl           = "~/WeForms_Reportes/Wfrm_RepOficioDevolucion.aspx";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
     else if (e.CommandName == "DocRnf")
     {
         RadWindow1.Title = "Constancia RNF";
         string  RegistroId    = ClGestion.Get_DocumentoId(7, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
         DataSet DatosRegistro = ClGestion.ImpresionConstanciaRFF(2, Convert.ToInt32(RegistroId), 0, 0, DateTime.Now, "01/01/2000", DateTime.Now);
         Session["DatosConstanciaRRF"] = DatosRegistro;
         RadWindow1.NavigateUrl        = "~/WeForms_Reportes/Wfrm_ConstanciaRRF.aspx";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
     }
 }
        protected void BtnEntregar_Click(object sender, EventArgs e)
        {
            Page.Title = ViewState["PageTit"].ToString().Trim();
            Idioma     = (DataTable)ViewState["TablaIdioma"];
            DataRow[] Result;
            string    VbTieneReg = "N";

            if (TxtObserv.Text.Trim().Equals(""))
            {
                Result = Idioma.Select("Objeto= 'MstrMens22'");
                foreach (DataRow row in Result)
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('" + row["Texto"].ToString() + "');", true);
                }                                                                                                                                       //
                return;
            }
            if (DdlCliente.Text.Trim().Equals(""))
            {
                Result = Idioma.Select("Objeto= 'MensSalConsg01'");
                foreach (DataRow row in Result)
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('" + row["Texto"].ToString() + "');", true);
                }                                                                                                                                       //Debe seleccionar un cliente.
                return;
            }
            List <CsInsertElementoAlmacen> ObjDetalle = new List <CsInsertElementoAlmacen>();

            foreach (GridViewRow Row in GrdDetalle.Rows)
            {
                string VbSn, VblLote;


                CheckBox CkbSelP = Row.FindControl("CkbSelP") as CheckBox;

                if (CkbSelP.Checked == true)
                {
                    VbTieneReg = "S";
                    switch (GrdDetalle.DataKeys[Row.RowIndex].Values["IdentificadorElem"].ToString().Trim())
                    {
                    case "SN":
                        VbSn = (Row.FindControl("LblSn") as Label).Text.Trim(); VblLote = "";
                        break;

                    case "LOTE":
                        VbSn = ""; VblLote = (Row.FindControl("LblSn") as Label).Text.Trim();
                        break;

                    default:
                        VbSn = ""; VblLote = "";
                        break;
                    }
                    var TypDetalle = new CsInsertElementoAlmacen()
                    {
                        IdIE             = Convert.ToInt32(0),
                        CodElemento      = GrdDetalle.DataKeys[Row.RowIndex].Values["CodElemento"].ToString().Trim(),
                        CodReferencia    = (Row.FindControl("LblRef") as Label).Text.Trim(),
                        PN               = (Row.FindControl("LblPn") as Label).Text.Trim(),
                        SN               = VbSn.Trim(),
                        Lote             = VblLote.Trim(),
                        CodTipoElem      = GrdDetalle.DataKeys[Row.RowIndex].Values["CodTipoElem"].ToString().Trim(),
                        Identificador    = GrdDetalle.DataKeys[Row.RowIndex].Values["IdentificadorElem"].ToString().Trim(),
                        Descripcion      = (Row.FindControl("LblDesc") as Label).Text.Trim(),
                        Cantidad         = Convert.ToDouble((Row.FindControl("LblCant") as TextBox).Text.Trim()),
                        CantidadAnt      = Convert.ToDouble((Row.FindControl("LblCantAct") as Label).Text.Trim()),
                        Valor            = Convert.ToDouble(0),
                        CodUndMed        = GrdDetalle.DataKeys[Row.RowIndex].Values["CodUndMed"].ToString().Trim(),
                        IdAlmacen        = Convert.ToInt32(GrdDetalle.DataKeys[Row.RowIndex].Values["CodIdAlmacen"].ToString().Trim()),
                        CodBodega        = GrdDetalle.DataKeys[Row.RowIndex].Values["CodBodega"].ToString().Trim(),
                        CodShippingOrder = "",
                        Posicion         = "0",
                        CodAeronave      = Convert.ToInt32(0),
                        Matricula        = "",
                        CCosto           = "",
                        AfectaInventario = Convert.ToInt32(0),
                        CostoImportacion = Convert.ToInt32(0),
                        CodTercero       = DdlCliente.Text.Trim(),
                        Consignacion     = Convert.ToInt32(0),
                        CodIdUbicacion   = Convert.ToInt32(GrdDetalle.DataKeys[Row.RowIndex].Values["CodIdUbicacion"].ToString().Trim()),
                        FechaVence       = null,
                        Observacion      = TxtObserv.Text.Trim(),
                        Proceso          = "0111", // Salida consignacion
                        IdDetPropHk      = Convert.ToInt32(0),
                        IdPPt            = Convert.ToInt32(0),
                        Accion           = "SALIDA",
                    };
                    ObjDetalle.Add(TypDetalle);
                }
            }
            if (VbTieneReg.Equals("S"))
            {
                CsInsertElementoAlmacen ClaseIEA = new CsInsertElementoAlmacen();
                ClaseIEA.FormOrigen(ViewState["PFileName"].ToString());
                ClaseIEA.Alimentar(ObjDetalle);

                string Mensj = ClaseIEA.GetMensj();
                if (!Mensj.Equals(""))
                {
                    string VbPNMen = ClaseIEA.GetPn().Trim().Equals("") ? "" : "[P/N: " + ClaseIEA.GetPn().Trim() + "]";
                    string VbSNMen = ClaseIEA.GetSn().Trim().Equals("") ? "" : "[S/N: " + ClaseIEA.GetSn().Trim() + "]";
                    string VbLot   = ClaseIEA.GetLote().Trim().Equals("") ? "" : "[LT/N: " + ClaseIEA.GetLote().Trim() + "]";
                    Result = Idioma.Select("Objeto= '" + Mensj.ToString().Trim() + "'");
                    foreach (DataRow row in Result)
                    {
                        Mensj = row["Texto"].ToString().Trim();
                    }
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('" + Mensj + "  " + VbPNMen + "  " + VbSNMen + "  " + VbLot + "');", true);
                    return;
                }
                TxtObserv.Text        = ""; DdlBodega.Text = ""; DdlCliente.Text = ""; BtnEntregar.Enabled = false;
                GrdDetalle.DataSource = null; GrdDetalle.DataBind();
            }
        }
示例#18
0
        void GrdManejoForestal_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "CmdVer")
            {
                RadWindow1.Title = "Plan de Manejo Forestal";
                int SubCategoriaId = ClManejo.Get_SubCategoriaPlanManejo(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]), 2, 2);
                RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_PlanManejoForestal.aspx?identificateur=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString(), true)) + "&source=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt("2", true)) + "&souscategorie=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoriaId.ToString(), true)) + "";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "CmdSolComple")
            {
                TxtGestionId.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"].ToString();
                GrdDetalle.Rebind();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindowDetalle.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocAceptacion")
            {
                RadWindow1.Title = "Constancia de Admisión de Expediente";
                string Admision_GestionId = ClGestion.Get_DocumentoId(1, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
                string SubCategoria       = ClGestion.Get_SubCategoria_Gestion(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
                RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepConstanciaAdmisionExp.aspx?gestion=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(Admision_GestionId, true)) + "&subcategoria=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(SubCategoria.ToString(), true)) + "";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocProvidencia")
            {
                RadWindow1.Title = "Providencia para traslado de Expediente";
                string  ProvidenciaId    = ClGestion.Get_DocumentoId(2, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
                DataSet DatosProvidencia = ClGestion.ImpresionProvidenciaGestion(2, Convert.ToInt32(ProvidenciaId), "", "", Convert.ToInt32(Session["UsuarioId"]), 0);
                Session["DatosProvidencia"] = DatosProvidencia;
                RadWindow1.NavigateUrl      = "~/WeForms_Reportes/Wfrm_RepProvidenciaTrasladoExp.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocJurudico")
            {
                RadWindow1.Title = "Dictamen Juridico";
                string  Dictamen_Juridico_Id = ClGestion.Get_DocumentoId(3, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
                DataSet dsTemp = new DataSet();
                DataSet DatosDictamenJuridico = ClGestion.ImpresionDictamenJuridicoGestion(2, Convert.ToInt32(Dictamen_Juridico_Id), 0, "", "", "", "", "", 0, "", "", "", dsTemp, "");
                Session["DatosDictamenJuridico"] = DatosDictamenJuridico;
                RadWindow1.NavigateUrl           = "~/WeForms_Reportes/Wfrm_RepDictamenJuridico.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocEnmiendas")
            {
                RadWindow1.Title = "Oficio de enmiendas jurídicas";
                string  OficioEnmiendaId     = ClGestion.Get_DocumentoId(5, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
                DataSet DatosOficioEnmiendas = ClGestion.ImpresionOficioEnmiendasJuridico(2, Convert.ToInt32(OficioEnmiendaId), Convert.ToInt32(Session["UsuarioId"]));
                Session["DatosOficioEnmiendasJuridico"] = DatosOficioEnmiendas;
                RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepOficioEnmiendaJuridica.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocOficioDev")
            {
                RadWindow1.Title = "Oficio de Devolución";
                string  OficioDevolucionId    = ClGestion.Get_DocumentoId(6, Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"])).ToString();
                DataSet dsTemp                = new DataSet();
                DataSet DatosOficioDevolucion = ClGestion.ImpresionOficioDevolucion(2, Convert.ToInt32(OficioDevolucionId), 0, dsTemp, "", 0, 0);
                Session["DatosOficioDevolucion"] = DatosOficioDevolucion;
                RadWindow1.NavigateUrl           = "~/WeForms_Reportes/Wfrm_RepOficioDevolucion.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocDictamenTec")
            {
                RadWindow1.Title = "Dictamen Técnico";
                int GestionId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]);


                int SubCategoriaId = ClManejo.Get_SubCategoriaPlanManejo(GestionId, 2, 2);
                int CategoriaId    = ClGestion.Get_CategoriaRNFId(SubCategoriaId);

                DataSet dsDatos         = ClGestion.Get_Datos_DictamenTecnico_Gestion(GestionId);
                DataSet DsDatosDictamen = new DataSet("DsDatosDictamen");


                DataTable  DtDatosDictamen         = DsDatosDictamen.Tables.Add("DatosDictamen");
                DataColumn MetodologiaCorro        = DtDatosDictamen.Columns.Add("MetodologiaCorro", typeof(string));
                DataColumn MetodologiaInvForestal  = DtDatosDictamen.Columns.Add("MetodologiaInvForestal", typeof(string));
                DataColumn FormaEvaluacion         = DtDatosDictamen.Columns.Add("FormaEvaluacion", typeof(string));
                DataColumn ConCaracBio             = DtDatosDictamen.Columns.Add("ConCaracBio", typeof(string));
                DataColumn ConVeracidad            = DtDatosDictamen.Columns.Add("ConVeracidad", typeof(string));
                DataColumn ConPropuestaManejo      = DtDatosDictamen.Columns.Add("ConPropuestaManejo", typeof(string));
                DataColumn ConPropuestaTratamiento = DtDatosDictamen.Columns.Add("ConPropuestaTratamiento", typeof(string));
                DataColumn Dictamen             = DtDatosDictamen.Columns.Add("Dictamen", typeof(string));
                DataColumn TipoGarantia         = DtDatosDictamen.Columns.Add("TipoGarantia", typeof(string));
                DataColumn DictamenId           = DtDatosDictamen.Columns.Add("DictamenId", typeof(int));
                DataColumn MontoGarantia        = DtDatosDictamen.Columns.Add("MontoGarantia", typeof(double));
                DataColumn PorGarantia          = DtDatosDictamen.Columns.Add("PorGarantia", typeof(int));
                DataColumn TotValMaderaPie      = DtDatosDictamen.Columns.Add("TotValMaderaPie", typeof(double));
                DataColumn RecomendacionUno     = DtDatosDictamen.Columns.Add("RecomendacionUno", typeof(string));
                DataColumn RecomendacionDos     = DtDatosDictamen.Columns.Add("RecomendacionDos", typeof(string));
                DataColumn OtrasRecomendaciones = DtDatosDictamen.Columns.Add("OtrasRecomendaciones", typeof(string));

                DataSet    DsEtapa = new DataSet("DsDatosEtapa");
                DataTable  DtEtapa = DsEtapa.Tables.Add("Etapa");
                DataColumn EtapaId = DtEtapa.Columns.Add("EtapaId", typeof(int));
                DataColumn Etapa   = DtEtapa.Columns.Add("Etapa", typeof(string));
                DataColumn FecIni  = DtEtapa.Columns.Add("FecIni", typeof(string));
                DataColumn FecFin  = DtEtapa.Columns.Add("FecFin", typeof(string));



                DataRow item = DsDatosDictamen.Tables["DatosDictamen"].NewRow();
                item["MetodologiaCorro"]       = dsDatos.Tables["Datos"].Rows[0]["Metodologia_Corroboracion_Inventario"];
                item["MetodologiaInvForestal"] = dsDatos.Tables["Datos"].Rows[0]["Metodologia_Resultados_Inventario"];
                if (dsDatos.Tables["Datos"].Rows[0]["Tipo_InventarioId"].ToString() == "1")
                {
                    item["FormaEvaluacion"] = "Forma de Evaluación: " + dsDatos.Tables["Datos"].Rows[0]["Tipo_Inventario"].ToString() + ", Total de Rodales: " + dsDatos.Tables["Datos"].Rows[0]["TotalRodal"].ToString() + " Rodales Muestreados: " + dsDatos.Tables["Datos"].Rows[0]["RodalesMuestreados"].ToString();
                }
                else
                {
                    item["FormaEvaluacion"] = "Forma de Evaluación: " + dsDatos.Tables["Datos"].Rows[0]["Tipo_Inventario"].ToString() + ", Tamaño y Forma de parcela: " + dsDatos.Tables["Datos"].Rows[0]["Tamano"].ToString() + " " + dsDatos.Tables["Datos"].Rows[0]["Forma_Parcela"].ToString() + ",  Total de Rodales: " + dsDatos.Tables["Datos"].Rows[0]["TotalRodal"].ToString() + " Rodales Muestreados: " + dsDatos.Tables["Datos"].Rows[0]["RodalesMuestreados"].ToString();
                }

                item["ConCaracBio"]             = dsDatos.Tables["Datos"].Rows[0]["Conclusion_Biofisica"].ToString();
                item["ConVeracidad"]            = dsDatos.Tables["Datos"].Rows[0]["Conclusion_Veracidad"].ToString();
                item["ConPropuestaManejo"]      = dsDatos.Tables["Datos"].Rows[0]["Conclusion_PropuestaManejo"].ToString();
                item["ConPropuestaTratamiento"] = dsDatos.Tables["Datos"].Rows[0]["Conclusion_Propuesta_Tratamiento"].ToString();
                item["Dictamen"]     = dsDatos.Tables["Datos"].Rows[0]["Tipo_Dictamen"].ToString();
                item["TipoGarantia"] = dsDatos.Tables["Datos"].Rows[0]["Tipo_Garantia"].ToString();
                item["DictamenId"]   = dsDatos.Tables["Datos"].Rows[0]["Tipo_DictamenId"].ToString();
                if (dsDatos.Tables["Datos"].Rows[0]["Tipo_DictamenId"].ToString() == "1")
                {
                    DataSet DsGarantia = ClCatalogos.Sp_Get_Monto_Garantia(Convert.ToInt32(dsDatos.Tables["Datos"].Rows[0]["Tipo_GarantiaId"]));
                    item["MontoGarantia"] = (Convert.ToDouble(ClManejo.Get_Compromiso_Area(GestionId)) * Convert.ToDouble(DsGarantia.Tables["Datos"].Rows[0]["Valor_Hectaria"])).ToString();
                    item["PorGarantia"]   = DsGarantia.Tables["Datos"].Rows[0]["Porcentaje"].ToString();
                    DsGarantia.Clear();
                    item["TotValMaderaPie"]  = ClGestion.Get_TotalValorMadera(GestionId);
                    item["RecomendacionUno"] = "7.1     Se recomienda que la vigencia del aprovechamiento sea de: " + dsDatos.Tables["Datos"].Rows[0]["Vigencia"].ToString() + ".";
                    if (Convert.ToInt32(dsDatos.Tables["Datos"].Rows[0]["Notas_Autorizadas"]) > 10)
                    {
                        item["RecomendacionDos"] = "7.1     Que se le autorice la venta total de " + dsDatos.Tables["Datos"].Rows[0]["Notas_Autorizadas"].ToString() + ". De estas, se le entregarán únicamente " + dsDatos.Tables["Datos"].Rows[0]["Notas_Entregar"].ToString() + ", las otras " + dsDatos.Tables["Datos"].Rows[0]["Notas_Restantes"].ToString() + " se adjuntarán al expediente, sin foliar, mismas que se entregarán luego al titular o su representante legal cuando presente Informe de uso de notas de envío.";
                    }
                    else
                    {
                        item["RecomendacionDos"] = "7.7     Que se le autorice la venta total de " + dsDatos.Tables["Datos"].Rows[0]["Notas_Autorizadas"].ToString() + ".";
                    }
                    DataSet dsAreas = ClManejo.Get_Areas_PlanManejo(GestionId);

                    if (Convert.ToDouble(dsAreas.Tables["Datos"].Rows[0]["AreaIntervenir"]) > 100)
                    {
                        item["OtrasRecomendaciones"] = "7.9     " + dsDatos.Tables["Datos"].Rows[0]["OtrasRecomendacion"].ToString();
                    }
                    else
                    {
                        item["OtrasRecomendaciones"] = "7.8     " + dsDatos.Tables["Datos"].Rows[0]["OtrasRecomendacion"].ToString();
                    }

                    DataSet dsDatosEtapa = ClGestion.Get_Etapas_Dictamen_Tecnico(GestionId);
                    for (int i = 0; i < dsDatosEtapa.Tables["Datos"].Rows.Count; i++)
                    {
                        DataRow itemEtapa = DsEtapa.Tables["Etapa"].NewRow();
                        itemEtapa["EtapaId"] = dsDatosEtapa.Tables["Datos"].Rows[0]["EtapaId"];
                        itemEtapa["Etapa"]   = dsDatosEtapa.Tables["Datos"].Rows[0]["Etapa"];
                        itemEtapa["FecIni"]  = dsDatosEtapa.Tables["Datos"].Rows[0]["FecIni"];
                        itemEtapa["Fecfin"]  = dsDatosEtapa.Tables["Datos"].Rows[0]["FecFin"];
                        DsEtapa.Tables["Etapa"].Rows.Add(itemEtapa);
                    }
                }
                DsDatosDictamen.Tables["DatosDictamen"].Rows.Add(item);
                dsDatos.Clear();


                Session["DatosDictamenTec"] = ClGestion.ImpresionDictamenTecnio(GestionId, 2, CategoriaId, DsDatosDictamen, DsEtapa, Convert.ToInt32(Session["UsuarioId"]));
                RadWindow1.Title            = "Dictamen Técnico";
                RadWindow1.NavigateUrl      = "~/WeForms_Reportes/Wfrm_RepDictamenTecnico.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocDictamenSubReg")
            {
                int GestionId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]);
                Session["DatosDictamenSubRegion"] = ClGestion.ImpresionDictamenSubRegional(GestionId, 2, Convert.ToInt32(Session["UsuarioId"]), 0, "");
                RadWindow1.Title       = "Dictamen Subregional";
                RadWindow1.NavigateUrl = "~/WeForms_Reportes/Wfrm_RepDictamenSubRegional.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
            else if (e.CommandName == "DocLicencia")
            {
                int GestionId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GestionId"]);
                Session["DatosLicencia"] = ClGestion.ImpresionLicencia(GestionId, 2, Convert.ToInt32(Session["UsuarioId"]), 0, DateTime.Now, DateTime.Now, "");
                RadWindow1.Title         = "Vista Previa Licencia Forestal";
                RadWindow1.NavigateUrl   = "~/WeForms_Reportes/Wfrm_RepLicencia_Forestal.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindow1.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
        }
示例#19
0
    protected void BtnGetDetailsOT_Click(object sender, EventArgs e)
    {
        if (GrdOT.Rows.Count > 0)
        {
            _DETALLE = new List <DetalleConsumo>();
            int           cont       = 0;
            bool          StockBreak = false;
            List <string> CodeBrk    = new List <string>();
            List <string> OTCodeBrk  = new List <string>();
            foreach (GridViewRow row in GrdOT.Rows)
            {
                var check = row.FindControl("ChkOT") as CheckBox;

                if (check.Checked)
                {
                    cont++;
                    GetDatosOtPconsumno GetOt    = new GetDatosOtPconsumno(check.Text);
                    List <TablaPOTD>    ListpOTD = new List <TablaPOTD>();
                    ListpOTD.AddRange(GetOt.POTD.Where(it => it._NIVEL == "1").Where(dot => dot._CANTIDADF > 0).ToList());
                    GetTotalStock totalStock = new GetTotalStock(GetOt.POTE._EMPRESA, "PHU", "PPR");
                    foreach (var item in ListpOTD)
                    {
                        bool GetAltern = false;
                        bool hastock   = false;
                        if (totalStock.Stock.ContainsKey(item._CODIGO))
                        {
                            double ValueStock = (double)totalStock.Stock[item._CODIGO];
                            if (ValueStock <= 0 || ValueStock < item._CANTIDADF)
                            {
                                GetAltern = true;
                            }
                            else
                            {
                                totalStock.Stock[item._CODIGO] = ValueStock - item._CANTIDADF;
                                hastock = true;
                            }
                        }
                        else
                        {
                            GetAltern = true;
                        }



                        string code;

                        if (GetAltern)
                        {
                            VerStockMaterial verStock = new VerStockMaterial(GetOt.POTE._EMPRESA, "PHU", "PPR", item._CODIGO, item._CANTIDADF);
                            if (verStock.HasStock)
                            {
                                code    = item._CODIGO;
                                hastock = true;
                            }
                            else if (verStock.IsAlternativa)
                            {
                                code    = verStock.Datos.CODIGO;
                                hastock = true;
                            }
                            else
                            {
                                hastock = false;
                                code    = "";
                            }
                        }
                        else
                        {
                            code = item._CODIGO;
                        }



                        if (hastock)
                        {
                            GetPMSUCyCODMAQ PMSUCyCODMAQ = new GetPMSUCyCODMAQ(code, "PHU", item._IDPOTL, item._OPERACION, GetOt.POTE._EMPRESA);
                            DetalleConsumo  detail       = new DetalleConsumo
                            {
                                _IDPOTL    = item._IDPOTL,
                                _CANTIDADF = item._CANTIDADF,
                                _CODIGO    = code,
                                _IDPOTD    = item.IDPOTD,
                                _KOFUCRE   = GetOt.POTE._KOFUCRE,
                                _MODO      = GetOt.POTE._MODO,
                                _NIVELSUP  = item._NIVELSUP,
                                _NUMOT     = GetOt.POTE._NUMOT,
                                _OPERACION = item._OPERACION,
                                _SUBNREG   = item._SUBNREG,
                                _SUOT      = GetOt.POTE._SUOT,
                                _TIMODO    = GetOt.POTE._TIMODO,
                                _TIPO      = item._TIPO,
                                _TIPOUNI   = item._TIPOUNI,
                                _UNIDAD    = item._UNIDAD,
                                _UNIDADC   = item._UNIDADC,
                                _TAMODO    = GetOt.POTE._TAMODO,
                                _CODMAQ    = PMSUCyCODMAQ.CODMAQ,
                                _PPPRPMSUC = PMSUCyCODMAQ.PMSUC,
                            };
                            _DETALLE.Add(detail);
                        }
                        else
                        {
                            StockBreak = true;
                            CodeBrk.Add(item._CODIGO.Trim());
                            OTCodeBrk.Add(GetOt.POTE._NUMOT);
                            code = "";
                        }
                    }
                }
            }
            if (_DETALLE.Count > 0)
            {
                BtnGenConsumo.Visible = true;
            }
            else
            {
                BtnGenConsumo.Visible = false;
            }
            panelDetalle.Visible  = true;
            GrdDetalle.DataSource = _DETALLE;
            GrdDetalle.DataBind();

            if (StockBreak)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "myalert", "alert('Los siguientes códigos no tienen stock ni producto alternativo: " + string.Join(", ", CodeBrk.Distinct()) +
                                                        ". La(s) OT(s) " + string.Join(", ", OTCodeBrk.Distinct()) + " seguirá apareciendo hasta que se haga el consumo de dicho(s) componentes.')", true);
            }
        }
        else
        {
        }
    }
示例#20
0
        protected void CargarDetalle(Int32 idInventario, Int32 idVenta)
        {
            //  List<INE.ServiciosWeb.Producto.Contrato.Producto> productos;
            DataTable detalle;
            Int32     i;

            FormsIdentity             id     = (FormsIdentity)Context.User.Identity;
            FormsAuthenticationTicket ticket = id.Ticket;
            string data = ticket.UserData;

            Utils.Usuario user = new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize <Utils.Usuario>(data);

            ProductoServicio_T.ProductoContratoClient pro = new ProductoContratoClient();
            var productos = pro.ObtenerListadoPorAgenteEconomicoActivo(user.IdAgenteEconomico);


            detalle = new DataTable();
            detalle.Columns.Add("Id");
            detalle.Columns.Add("Concepto");


            i = 2;
            foreach (var p in productos)
            {
                var productoPresentacionTipo = p.ProductoPresentacionTipos.Where(pp => pp.IdPresentacionTipo == 4 && pp.Activo == true).FirstOrDefault();
                detalle.Columns.Add(productoPresentacionTipo.IdProductoxPresentacion.ToString());
                GrdDetalle.Columns[i].HeaderText     = p.NombreComercial;
                GrdComprobante.Columns[i].HeaderText = p.NombreComercial; //ESTO LO PUSE VEAMOS
                i++;
            }


            detalle.Rows.Add(detalle.NewRow());
            detalle.Rows[detalle.Rows.Count - 1]["Concepto"] = "Inventario Actual(Gls): ";
            detalle.Rows[detalle.Rows.Count - 1]["Id"]       = idInventario;
            detalle.Rows.Add(detalle.NewRow());
            detalle.Rows[detalle.Rows.Count - 1]["Id"]       = 2;
            detalle.Rows[detalle.Rows.Count - 1]["Concepto"] = "Ventas del día anterior(Lts):";
            detalle.Rows.Add(detalle.NewRow());
            detalle.Rows[detalle.Rows.Count - 1]["Id"]       = 3;
            detalle.Rows[detalle.Rows.Count - 1]["Concepto"] = "Precio x Lts(C$):";


            GrdDetalle.DataSource = detalle;
            GrdDetalle.DataBind();

            GrdComprobante.DataSource = detalle;
            GrdComprobante.DataBind();

            // GrdComprobante.Rows[0].Cells[1].BackColor = Color.FromArgb(109,108,110); //Con esto coloreamos la celdas de la parte izquierda del comprobante



            // ((TextBox)GrdDetalle.Rows[1].FindControl("Txt8") ).Text = "15" ;



            for (i = 0; i < productos.Count(); i++)
            {
                var productoPresentacion = productos[i].ProductoPresentacionTipos.Where(pp => pp.IdPresentacionTipo == 4 && pp.Activo == true).SingleOrDefault();

                if (productoPresentacion != null)
                {
                    if (idInventario != 0)
                    {
                        InventarioServicio_T.InventarioContratoClient invent = new InventarioContratoClient();

                        var inventario = invent.Obtener(idInventario);
                        (GrdDetalle.Rows[0].Cells[i + 2].FindControl("TxtCampo" + (i + 2).ToString()) as TextBox).Text = inventario.InventarioDetalle.Where(det => det.IdProductoxPresentacion == productoPresentacion.IdProductoxPresentacion).SingleOrDefault().InventarioTotal.ToString("#,##0.00");

                        TxtObservacion.Text = inventario.Observaciones;

                        //ASPxTimeEdit.Value = inventario.HoraCorte;
                    }

                    if (idVenta != 0)
                    {
                        VentaServicio_T.VentaContratoClient vent = new VentaContratoClient();


                        var venta = vent.Obtener(idVenta);
                        (GrdDetalle.Rows[1].Cells[i + 2].FindControl("TxtCampo" + (i + 2).ToString()) as TextBox).Text = venta.VentaDetalles.Where(det => det.IdProductoxPresentacion == productoPresentacion.IdProductoxPresentacion).SingleOrDefault().Volumen.ToString("#,##0.00");
                        (GrdDetalle.Rows[2].Cells[i + 2].FindControl("TxtCampo" + (i + 2).ToString()) as TextBox).Text = venta.VentaDetalles.Where(det => det.IdProductoxPresentacion == productoPresentacion.IdProductoxPresentacion).SingleOrDefault().Precio.ToString("#,##0.00");
                    }

                    (GrdDetalle.Rows[0].Cells[i + 2].FindControl("HdfIdProductoXPresentacion" + (i + 2).ToString()) as HiddenField).Value = productoPresentacion.IdProductoxPresentacion.ToString();
                    (GrdDetalle.Rows[1].Cells[i + 2].FindControl("HdfIdProductoXPresentacion" + (i + 2).ToString()) as HiddenField).Value = productoPresentacion.IdProductoxPresentacion.ToString();
                    (GrdDetalle.Rows[2].Cells[i + 2].FindControl("HdfIdProductoXPresentacion" + (i + 2).ToString()) as HiddenField).Value = productoPresentacion.IdProductoxPresentacion.ToString();
                }
                else
                {
                    (GrdDetalle.Rows[0].Cells[i + 2].FindControl("TxtCampo" + (i + 2).ToString()) as TextBox).Text = "0.00";

                    (GrdDetalle.Rows[1].Cells[i + 2].FindControl("TxtCampo" + (i + 2).ToString()) as TextBox).Text = "0.00";
                    (GrdDetalle.Rows[2].Cells[i + 2].FindControl("TxtCampo" + (i + 2).ToString()) as TextBox).Text = "0.00";
                }

                (GrdDetalle.Rows[0].Cells[i + 2].FindControl("HdfIdProducto" + (i + 2).ToString()) as HiddenField).Value = productos[i].IdProducto.ToString();
                (GrdDetalle.Rows[1].Cells[i + 2].FindControl("HdfIdProducto" + (i + 2).ToString()) as HiddenField).Value = productos[i].IdProducto.ToString();
                (GrdDetalle.Rows[2].Cells[i + 2].FindControl("HdfIdProducto" + (i + 2).ToString()) as HiddenField).Value = productos[i].IdProducto.ToString();
            }

            for (i = productos.Count() + 2; i < GrdDetalle.Columns.Count; i++)
            {
                GrdDetalle.Columns[i].Visible     = false;
                GrdComprobante.Columns[i].Visible = false;
            }

            if (idVenta > 0)
            {
                VentaServicio_T.VentaContratoClient vent = new VentaContratoClient();
                var venta = vent.Obtener(idVenta);
            }
        }
示例#21
0
 public void Carga_Datos()
 {
     DefinirColumnasNotebook();
     GrdDetalle.DataSource = DatosDetalle.Tables[TDetalle];
     GrdDetalle.DataBind();
 }