예제 #1
0
        private void değiştirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (gridView2.FocusedRowHandle < 0)
            {
                return;
            }

            DataRow drss = gridView2.GetDataRow(gridView2.FocusedRowHandle);

            frmStokAra StokAra = new frmStokAra("");

            StokAra.Tag = "0";
            StokAra.ShowDialog();

            if (StokAra.TopMost == false)
            {
                for (int i = 0; i < StokAra.gridView1.SelectedRowsCount; i++)
                {
                    string v = StokAra.gridView1.GetSelectedRows().GetValue(i).ToString();

                    DataRow dr          = StokAra.gridView1.GetDataRow(int.Parse(v));
                    string  pkStokKarti = dr["pkStokKarti"].ToString();
                    //string Barkod=dr["Barcode"].ToString();
                    DB.ExecuteSQL("update SiparisStoklari set fkStokKarti=" + pkStokKarti +
                                  " where pkSiparisStoklari=" + drss["pkSiparisStoklari"].ToString());
                }
            }
            StokAra.Dispose();

            SiparisStoklari();
        }
예제 #2
0
        private void simpleButton8_Click(object sender, EventArgs e)
        {
            frmStokAra StokAra = new frmStokAra("");

            StokAra.Tag = "0";
            StokAra.ShowDialog();
            lueStoklar.Tag = "0";
            //Urunler();

            if (StokAra.TopMost == false)
            {
                for (int i = 0; i < StokAra.gridView1.SelectedRowsCount; i++)
                {
                    string v = StokAra.gridView1.GetSelectedRows().GetValue(i).ToString();

                    DataRow dr          = StokAra.gridView1.GetDataRow(int.Parse(v));
                    string  pkStokKarti = dr["pkStokKarti"].ToString();
                    //int sk = 0;
                    //int.TryParse(pkStokKarti, out sk);
                    //lueStoklar.EditValue = sk;
                    txtStokKarti_id.Text = pkStokKarti;
                }
            }
            StokAra.Dispose();
        }
예제 #3
0
        void urunaraekle()
        {
            //YeniSatisEkle();
            frmStokAra StokAra = new frmStokAra("");

            StokAra.Tag = "0";
            StokAra.ShowDialog();
            if (StokAra.TopMost == false)
            {
                //StokAra.gridView1.FilterDisplayText("Starts with([Sec], True)";
                //for (int i = 0; i < StokAra.gridView1.DataRowCount; i++)
                //{



                for (int i = 0; i < StokAra.gridView1.SelectedRowsCount; i++)
                {
                    string v = StokAra.gridView1.GetSelectedRows().GetValue(i).ToString();
                    //if (StokAra.gridView1.GetSelectedRows()[i] >= 0)
                    //{
                    DataRow dr = StokAra.gridView1.GetDataRow(int.Parse(v));
                    //AlisDetayEkle(dr["Barcode"].ToString());
                    //}

                    //DataRow dr = StokAra.gridView1.GetDataRow(i);
                    //if (dr["Sec"].ToString() == "True")
                    //{
                    if (DB.GetData("select StokAdi from EksikListesi el with(nolock) where fkStokKarti=" + dr["pkStokKarti"].ToString()).Rows.Count == 0)
                    {
                        ArrayList list = new ArrayList();
                        list.Add(new SqlParameter("@StokAdi", dr["StokAdi"].ToString()));
                        list.Add(new SqlParameter("@FirmaAdi", dr["FirmaAdi"].ToString()));
                        list.Add(new SqlParameter("@fkStokKarti", dr["pkStokKarti"].ToString()));
                        DB.ExecuteSQL(@"INSERT INTO EksikListesi (StokAdi,Miktar,FirmaAdi,fkStokKarti,Durumu,Tarih)
                        VALUES(@StokAdi,1,@FirmaAdi,@fkStokKarti,'Alınacak',getdate())", list);
                    }
                    else
                    {
                        frmMesajBox Mesaj = new frmMesajBox(200);
                        Mesaj.label1.Text = "Daha Önce Eklendi!";
                        Mesaj.Show();
                    }
                    //}
                    //SatisDetayEkle(dr["Barcode"].ToString());
                    //SatisDetayEkle(StokAra.pkurunid.Text);
                }
            }
            //SatisDetayEkle(StokAra.pkurunid.Text);
            StokAra.Dispose();
            gridyukle();
            //yesilisikyeni();
        }
        void urunaraekle()
        {
            frmStokAra StokAra = new frmStokAra("");

            StokAra.Tag = "2";
            StokAra.ShowDialog();
            if (StokAra.TopMost == false)
            {
                for (int i = 0; i < StokAra.gridView1.DataRowCount; i++)
                {
                    DataRow dr = StokAra.gridView1.GetDataRow(i);
                    if (dr["Sec"].ToString() == "True")
                    {
                        ekle(dr["pkStokKarti"].ToString());
                    }
                }
            }
            StokAra.Dispose();
        }
예제 #5
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            frmStokAra StokAra = new frmStokAra("");

            StokAra.Tag = "0";
            StokAra.ShowDialog();
            if (StokAra.gridView1.FocusedRowHandle >= 0)
            {
                DataRow dr       = StokAra.gridView1.GetDataRow(StokAra.gridView1.FocusedRowHandle);
                int     pkUrunid = 0;
                int.TryParse(dr["pkStokKarti"].ToString(), out pkUrunid);
                if (pkUrunid == 0)
                {
                    return;
                }
                barkod.Text    = dr["Barcode"].ToString();
                barkod.ToolTip = dr["Stokadi"].ToString();
                //barkod.Tag = dr["pkStokadi"].ToString();
                labelControl1.Text = dr["Stokadi"].ToString();
            }
            StokAra.Dispose();
        }
예제 #6
0
        private void ekleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmStokAra StokAra = new frmStokAra("");

            StokAra.Tag = "0";
            StokAra.ShowDialog();

            if (StokAra.TopMost == false)
            {
                for (int i = 0; i < StokAra.gridView1.SelectedRowsCount; i++)
                {
                    string v = StokAra.gridView1.GetSelectedRows().GetValue(i).ToString();

                    DataRow dr          = StokAra.gridView1.GetDataRow(int.Parse(v));
                    string  pkStokKarti = dr["pkStokKarti"].ToString();

                    DB.ExecuteSQL("insert into SiparisStoklari (fkStokKarti,Aktif,Sira) values(" + pkStokKarti + ",1," + (gridView2.DataRowCount + 1).ToString() + ")");
                }

                SiparisStoklari();
            }
            StokAra.Dispose();
        }