protected void DataList1_SelectedIndexChanged(object sender, DataListCommandEventArgs e) { UuserPedido dato = new UuserPedido(); Luser ins = new Luser(); ins.obtenerPlato(); int res = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex].ToString()); }
protected void Page_Load(object sender, EventArgs e) { UuserReservas datos = new UuserReservas(); Luser user = new Luser(); int id_usuario = int.Parse(Session["user_id"].ToString()); // GV_misreservas.DataSource = user.obtenerMisReservas(id_usuario); //GV_misreservas.DataBind(); }
static void Main(string[] args) { Luser luser = new Luser("Arska"); User user1 = new User(luser); User user2 = new User(new Luser("Yuri")); user1 = null; user2 = null; GC.Collect(); // User is destructed, User is destructed, User Yuri is destructed Console.ReadLine(); // Luser Arska is destructed }
protected void B_guardar_Click(object sender, EventArgs e) { UuserPedido dato = new UuserPedido(); ClientScriptManager cm = this.ClientScript; Luser doc = new Luser(); dato.Id_usuario = int.Parse(Session["user_id"].ToString()); DataTable validez1 = doc.obtenerpe(dato.Id_usuario); dato.Id_pedido = int.Parse(validez1.Rows[0]["id_pedido"].ToString()); Button btn = (Button)sender; DataListItem item = (DataListItem)btn.NamingContainer; TextBox guardar = (TextBox)item.FindControl("TB_insertarPedido"); dato.Cantidad = int.Parse(guardar.Text); Label lblid = (Label)item.FindControl("Label1"); dato.Id_plato = int.Parse(lblid.Text); doc.guardarPedido(dato); cm.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('Pedido insertado con exito');</script>"); }
protected void Page_Load(object sender, EventArgs e) { Uuser dato = new Uuser(); Luser menu = new Luser(); }
public User(Luser luser) { this._luser = luser; }