private void BtnUpdate_Click(object sender, EventArgs e) { _product.ProductName = txtProductName.Text; _product.QuantityPerUnit = Convert.ToInt16(cbbBirimCinsi.SelectedValue); _product.ProductType = Convert.ToByte(cmbProductType.SelectedValue); _product.Weigh = Convert.ToInt32(txtAgırlık.Text); _db.KontrolluKaydet(RecordUpdated); }
private void BtnUpdate_Click(object sender, EventArgs e) { _vehicle.Brand = txtBrand.Text; _vehicle.Model = txtModel.Text; _vehicle.Plate = txtPlate.Text; _vehicle.Capacity = (int)nudCapacity.Value; _db.KontrolluKaydet(RecordUpdated); }
private void BtnSoforSil_Click(object sender, EventArgs e) { var ID = (Guid)lstSoforListele.SelectedValue; driver = (from p in _db.Drivers where p.ID == (Guid)ID select p).SingleOrDefault(); _db.Drivers.Remove(driver); _db.KontrolluKaydet(RecordDeleted); Helper.RecordReload += ListReload; }
private void BtnProductDelete_Click(object sender, EventArgs e) { // Product ID = (Product)lstProducts.SelectedItem; var ID = (Guid)lstProducts.SelectedValue; product = (from p in _db.Products where p.ID == (Guid)ID select p).SingleOrDefault(); _db.Products.Remove(product); _db.KontrolluKaydet(RecordDeleted); Helper.RecordReload += ListReload; }
private void BtnKaydet_Click(object sender, EventArgs e) { User user = new User() { ID = Guid.NewGuid(), UserName = txtUserName.Text, Password = txtPassword.Text }; _db.Users.Add(user); foreach (Role i in lstKullaniciTipi.SelectedItems) { user.Roles.Add(i); } _db.KontrolluKaydet(RecordEnter); }