private void silToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult answer = MessageBox.Show("Silmek istediğinize emin misiniz", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Stop);

            if (answer == DialogResult.Yes)
            {
                foreach (ListViewItem li in lstwSuppliers.SelectedItems)
                {
                    sup = li.Tag as Entity.Suppliers;
                }
                int result = supDAL.Delete(sup.id);
                MessageBox.Show(result + " satır silindi.");
                sup.listVieweDoldur(lstwSuppliers);
            }
        }
Пример #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem li in lstwSuppliers.SelectedItems)
            {
                sup = li.Tag as Entity.Suppliers;
            }
            sup.CompanyName  = txtCompanyName.Text;
            sup.ContactName  = txtContactName.Text;
            sup.ContactTitle = txtContactTitle.Text;
            sup.City         = txtCity.Text;
            sup.Country      = txtCountry.Text;
            sup.Adress       = txtAddress.Text;
            sup.Phone        = mtxtPhone.Text;
            int result = supDAL.Update(sup);

            MessageBox.Show(result + " satır güncellendi.");
            sup.listVieweDoldur(lstwSuppliers);
            Entity.Entity en = new Entity.Entity();
            en.Temizle(groupBox1);
            en.Temizle(groupBox2);
        }
Пример #3
0
 private void frmUpdateSuppliers_Load(object sender, EventArgs e)
 {
     sup.listVieweDoldur(lstwSuppliers);
 }
Пример #4
0
 private void frmListSuppliers_Load(object sender, EventArgs e)
 {
     Entity.Suppliers sup = new Entity.Suppliers();
     sup.listVieweDoldur(lstwSuppliers);
 }