protected void Insert(object sender, EventArgs e) { lblMensaje.Text = ""; if (txtBrand.Text != "" && txtCostUSD.Text != "" && txtModel.Text != "") { using (DroidikaContextDataContext ctx = new DroidikaContextDataContext()) { dCatDrone drone = new dCatDrone { brand = txtBrand.Text, model = txtModel.Text, costUsd = decimal.Parse(txtCostUSD.Text), flightTime = Int32.Parse(txtFlightTime.Text) }; ctx.dCatDrones.InsertOnSubmit(drone); ctx.SubmitChanges(); } this.BindGrid(); } else { lblMensaje.Text = "Favor de introducir los campos requeridos."; } }
partial void DeletedCatDrone(dCatDrone instance);
partial void UpdatedCatDrone(dCatDrone instance);
partial void InsertdCatDrone(dCatDrone instance);