Beispiel #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            int id = (int)dataGridView1.SelectedRows[0].Cells[0].Value;


            Ticari.stokRow r = ticari.stok.FindBystok_id(id);
            r.unit_price = 1.1 * r.unit_price;
            r.stok_name  = r.stok_name.ToUpper();
            stokTableAdapter.Update(r);
        }
Beispiel #2
0
        private void button9_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow item in dataGridView1.SelectedRows)
            {
                int id = (int)item.Cells[0].Value;

                Ticari.stokRow r = ticari.stok.FindBystok_id(id);

                r.Delete();
            }
            stokTableAdapter.Update(ticari.stok);
        }
Beispiel #3
0
        private void button7_Click(object sender, EventArgs e)
        {
            // Ticari.stokRow r = ticari.stok.FindBystok_id(5);

            int id = (int)dataGridView1.SelectedRows[0].Cells[0].Value;


            Ticari.stokRow r = ticari.stok.FindBystok_id(id);

            r.Delete();
            stokTableAdapter.Update(r);
        }
Beispiel #4
0
 private void button5_Click(object sender, EventArgs e)
 {
     //DataRow r = ticari.stok.NewRow();
     //r["stok_id"]  r[0]
     Ticari.stokRow r = ticari.stok.NewstokRow();
     //r["stok_id"]  r[0]
     r.stok_name  = "deneme";
     r.unit_price = 1250;
     r.cat_id     = 1;
     ticari.stok.AddstokRow(r);
     stokTableAdapter.Update(r);
 }