コード例 #1
0
        public void duzenle()
        {
            baglanti();
            Form16 frm16 = new Form16();

            frm16.TextBox1.Enabled  = false;
            frm16.TextBox2.Enabled  = false;
            frm16.ComboBox1.Enabled = false;
            frm16.ComboBox2.Enabled = false;
            frm16.ComboBox3.Enabled = false;
            frm16.TextBox3.Enabled  = false;
            frm16.TextBox4.Enabled  = false;
            frm16.TextBox5.Enabled  = false;
            frm16.TextBox6.Enabled  = false;
            frm16.TextBox9.Enabled  = false;
            frm16.TextBox10.Enabled = false;
            frm16.TextBox7.Enabled  = false;
            frm16.TextBox8.Enabled  = false;
            frm16.Button1.Enabled   = false;
            frm16.Button2.Enabled   = false;
            frm16.Button8.Enabled   = false;
            frm16.Button9.Enabled   = false;
            frm16.Button10.Enabled  = false;
            frm16.Button11.Enabled  = false;
            frm16.PictureBox1.Image = null;
            frm16.Button4.Visible   = true;
            frm16.Button12.Visible  = false;

            OleDbCommand    cmd = new OleDbCommand("SELECT * FROM STOKKARTI WHERE StokKodu='" + DataGridView1.CurrentRow.Cells[0].Value.ToString() + "'", bag);
            OleDbDataReader oku = cmd.ExecuteReader();

            if (oku.Read())
            {
                frm16.TextBox1.Text  = oku[0].ToString().Trim();
                frm16.TextBox2.Text  = oku[1].ToString().Trim();
                frm16.ComboBox1.Text = oku[2].ToString().Trim();
                frm16.ComboBox2.Text = oku[3].ToString().Trim();
                frm16.ComboBox3.Text = oku[4].ToString().Trim();
                frm16.TextBox3.Text  = oku[5].ToString().Trim();
                frm16.TextBox4.Text  = oku[6].ToString().Trim();
                frm16.TextBox5.Text  = oku[7].ToString().Trim();
                frm16.TextBox6.Text  = oku[8].ToString().Trim();
                frm16.TextBox9.Text  = oku[9].ToString().Trim();
                frm16.TextBox10.Text = oku[10].ToString().Trim();
                frm16.TextBox7.Text  = oku[11].ToString().Trim();
                frm16.TextBox8.Text  = oku[12].ToString().Trim();
                //frm16.PictureBox1.Image = Image.FromFile(oku[13].ToString());
            }
            oku.Close();
            frm16.ShowDialog();
        }
コード例 #2
0
 private void Timer2_Tick(object sender, EventArgs e)
 {
     toolStripProgressBar1.Value += 1;
     if (toolStripProgressBar1.Value >= 100)
     {
         Timer2.Enabled = false;
         if (f == 1)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm16 = new Form16();
             frm16.ShowDialog();
             return;
         }
         if (f == 2)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm10 = new Form10();
             frm10.ShowDialog();
             return;
         }
         if (f == 3)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm12 = new Form12();
             frm12.ShowDialog();
             return;
         }
         if (f == 4)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             this.WindowState            = FormWindowState.Maximized;
             Form frm5 = new Form5();
             frm5.ShowDialog();
         }
         if (f == 5)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm7 = new Form7();
             frm7.ShowDialog();
             return;
         }
         if (f == 6)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm8 = new Form8();
             frm8.ShowDialog();
             return;
         }
         if (f == 7)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm9 = new Form9();
             frm9.ShowDialog();
             return;
         }
         if (f == 8)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm13 = new Form13();
             frm13.ShowDialog();
             return;
         }
         if (f == 10)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm6 = new Form6();
             frm6.ShowDialog();
             return;
         }
         if (f == 11)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm15 = new Form15();
             frm15.ShowDialog();
             return;
         }
     }
 }