예제 #1
0
 void EliminarArticulo(int Item)
 {
     for (int i = 0; i < GrdArticulo.Items.Count; i++)
     {
         if (Item != Convert.ToInt32(GrdArticulo.Items[i].OwnerTableView.DataKeyValues[i]["Id_Articulo"]))
         {
             DataRow row = Ds_Temporal.Tables["Dt_Articulo_Dictamen_Juridico"].NewRow();
             row["Id_Articulo"] = Ds_Temporal.Tables["Dt_Articulo_Dictamen_Juridico"].Rows.Count;
             row["Articulo"]    = GrdArticulo.Items[i].OwnerTableView.DataKeyValues[i]["Articulo"];
             Ds_Temporal.Tables["Dt_Articulo_Dictamen_Juridico"].Rows.Add(row);
         }
     }
     GrdArticulo.Rebind();
 }
예제 #2
0
 void btnAddArticulo_ServerClick(object sender, EventArgs e)
 {
     if (TxtArticulo.Text == "")
     {
         TxtArticulo.Focus();
     }
     else
     {
         if (TxtIdArticulo.Text == "")
         {
             AgregarArticulo(TxtArticulo.Text);
         }
         else
         {
             ModificarArticulo(Convert.ToInt32(TxtIdArticulo.Text), TxtArticulo.Text);
         }
         GrdArticulo.Rebind();
         TxtArticulo.Text   = "";
         TxtIdArticulo.Text = "";
     }
 }
예제 #3
0
 void ModificarArticulo(int Item, string Articulo)
 {
     CargaDataSet();
     Ds_Temporal.Tables["Dt_Articulo_Dictamen_Juridico"].Rows[Item]["Articulo"] = Articulo;
     GrdArticulo.Rebind();
 }