internal static int DepoIDbul(string depoadi)
 {
     _sqlProvider = new SqlProvider("SELECT DEPOID FROM DEPO WHERE DEPOADI = @DEPOADI ", false);
     _sqlProvider.AddParameter("DEPOADI", depoadi);
     return(Convert.ToInt32(_sqlProvider.ExecuteScalar()));
 }
Exemple #2
0
        public static string DepofisEno()
        {
            SqlProvider sqlProvider = new SqlProvider("SELECT MAX(ENO)+1 FROM DEPOFIS WHERE SUBEID=01 AND LEN(ENO)=7 AND ENO<='9999999999999'", false);

            return(sqlProvider.ExecuteScalar().ToString());
        }
Exemple #3
0
        private void tSBtnKaydet_Click(object sender, EventArgs e)
        {
            _sqlProvider = new SqlProvider("SELECT COUNT(*) FROM ARTETIKETDETAY WHERE STOKID=@STOKID", false);
            _sqlProvider.AddParameter("STOKID", _dtStokDetay.Rows[0]["STOKID"]);
            bool update = Convert.ToBoolean(_sqlProvider.ExecuteScalar());

            if (update)
            {
                _sqlProvider = new SqlProvider(
                    " UPDATE ARTETIKETDETAY " +
                    " SET " +
                    "   EK1=@EK1, EK2=@EK2 ,EK3=@EK3, EK4=@EK4, EK5=@EK5, EK6=@EK6, EK7=@EK7, EK8=@EK8, EK9=@EK9, EK10=@EK10, " +
                    "   ADET1=@ADET1, ADET2=@ADET2 ,ADET3=@ADET3, ADET4=@ADET4, ADET5=@ADET5, ADET6=@ADET6, ADET7=@ADET7, ADET8=@ADET8, ADET9=@ADET9, " +
                    "   DARA1=@DARA1, DARA2=@DARA2 ,DARA3=@DARA3, DARA4=@DARA4, DARA5=@DARA5, DARA6=@DARA6, DARA7=@DARA7, DARA8=@DARA8, DARA9=@DARA9 " +
                    " WHERE STOKID=@STOKID", false);

                _sqlProvider.AddParameter("STOKID", _dtStokDetay.Rows[0]["STOKID"]);
                _sqlProvider.AddParameter("EK1", txtEk1.Text);
                _sqlProvider.AddParameter("EK2", txtEk2.Text);
                _sqlProvider.AddParameter("EK3", txtEk3.Text);
                _sqlProvider.AddParameter("EK4", txtEk4.Text);
                _sqlProvider.AddParameter("EK5", txtEk5.Text);
                _sqlProvider.AddParameter("EK6", txtEk6.Text);
                _sqlProvider.AddParameter("EK7", txtEk7.Text);
                _sqlProvider.AddParameter("EK8", txtEk8.Text);
                _sqlProvider.AddParameter("EK9", txtEk9.Text);
                _sqlProvider.AddParameter("EK10", txtEk10.Text);
                _sqlProvider.AddParameter("ADET1", txtAdet1.Text);
                _sqlProvider.AddParameter("ADET2", txtAdet2.Text);
                _sqlProvider.AddParameter("ADET3", txtAdet3.Text);
                _sqlProvider.AddParameter("ADET4", txtAdet4.Text);
                _sqlProvider.AddParameter("ADET5", txtAdet5.Text);
                _sqlProvider.AddParameter("ADET6", txtAdet6.Text);
                _sqlProvider.AddParameter("ADET7", txtAdet7.Text);
                _sqlProvider.AddParameter("ADET8", txtAdet8.Text);
                _sqlProvider.AddParameter("ADET9", txtAdet9.Text);
                _sqlProvider.AddParameter("DARA1", txtDara1.Text);
                _sqlProvider.AddParameter("DARA2", txtDara2.Text);
                _sqlProvider.AddParameter("DARA3", txtDara3.Text);
                _sqlProvider.AddParameter("DARA4", txtDara4.Text);
                _sqlProvider.AddParameter("DARA5", txtDara5.Text);
                _sqlProvider.AddParameter("DARA6", txtDara6.Text);
                _sqlProvider.AddParameter("DARA7", txtDara7.Text);
                _sqlProvider.AddParameter("DARA8", txtDara8.Text);
                _sqlProvider.AddParameter("DARA9", txtDara9.Text);
                _sqlProvider.ExecuteNonQuery();
            }
            else
            {
                _sqlProvider = new SqlProvider("INSERT INTO ARTETIKETDETAY (STOKID,EK1,EK2,EK3,EK4,EK5,EK6,EK7,EK8,EK9,EK10,ADET1,ADET2,ADET3,ADET4,ADET5,ADET6,ADET7,ADET8,ADET9,DARA1,DARA2,DARA3,DARA4,DARA5,DARA6,DARA7,DARA8,DARA9) VALUES (@STOKID,@EK1,@EK2,@EK3,@EK4,@EK5,@EK6,@EK7,@EK8,@EK9,@EK10,@ADET1,@ADET2,@ADET3,@ADET4,@ADET5,@ADET6,@ADET7,@ADET8,@ADET9,@DARA1,@DARA2,@DARA3,@DARA4,@DARA5,@DARA6,@DARA7,@DARA8,@DARA9)", false);

                _sqlProvider.AddParameter("STOKID", _dtStokDetay.Rows[0]["STOKID"]);
                _sqlProvider.AddParameter("EK1", txtEk1.Text);
                _sqlProvider.AddParameter("EK2", txtEk2.Text);
                _sqlProvider.AddParameter("EK3", txtEk3.Text);
                _sqlProvider.AddParameter("EK4", txtEk4.Text);
                _sqlProvider.AddParameter("EK5", txtEk5.Text);
                _sqlProvider.AddParameter("EK6", txtEk6.Text);
                _sqlProvider.AddParameter("EK7", txtEk7.Text);
                _sqlProvider.AddParameter("EK8", txtEk8.Text);
                _sqlProvider.AddParameter("EK9", txtEk9.Text);
                _sqlProvider.AddParameter("EK10", txtEk10.Text);
                _sqlProvider.AddParameter("ADET1", txtAdet1.Text);
                _sqlProvider.AddParameter("ADET2", txtAdet2.Text);
                _sqlProvider.AddParameter("ADET3", txtAdet3.Text);
                _sqlProvider.AddParameter("ADET4", txtAdet4.Text);
                _sqlProvider.AddParameter("ADET5", txtAdet5.Text);
                _sqlProvider.AddParameter("ADET6", txtAdet6.Text);
                _sqlProvider.AddParameter("ADET7", txtAdet7.Text);
                _sqlProvider.AddParameter("ADET8", txtAdet8.Text);
                _sqlProvider.AddParameter("ADET9", txtAdet9.Text);
                _sqlProvider.AddParameter("DARA1", txtDara1.Text);
                _sqlProvider.AddParameter("DARA2", txtDara2.Text);
                _sqlProvider.AddParameter("DARA3", txtDara3.Text);
                _sqlProvider.AddParameter("DARA4", txtDara4.Text);
                _sqlProvider.AddParameter("DARA5", txtDara5.Text);
                _sqlProvider.AddParameter("DARA6", txtDara6.Text);
                _sqlProvider.AddParameter("DARA7", txtDara7.Text);
                _sqlProvider.AddParameter("DARA8", txtDara8.Text);
                _sqlProvider.AddParameter("DARA9", txtDara9.Text);
                _sqlProvider.ExecuteNonQuery();
            }


            //int index = Convert.ToInt32(_frm.dataGridView1.CurrentRow.Index);
            _frm.StokDoldur();
            _frm.Focuss();
            _frm.StokSearch();
            Close();
            //_frm.dataGridView1.Rows[index].Selected = true;
            //_frm.dataGridView1.FirstDisplayedScrollingRowIndex = index;
            //_frm.dataGridView1.Refresh();
        }
Exemple #4
0
 public void StokDoldur()
 {
     _sqlProvider = new SqlProvider("SELECT S.STOKID, S.KODU, S.ADI, S.BIRIM, S.EK3 ETIKETTURU ,A.EK1,A.EK2,A.EK3,A.EK4,A.EK5,A.EK6,A.EK7,A.EK8,A.EK9,A.EK10,A.ADET1,A.ADET2,A.ADET3,A.ADET4,A.ADET5,A.ADET6,A.ADET7,A.ADET8,A.ADET9,A.DARA1,A.DARA2,A.DARA3,A.DARA4,A.DARA5,A.DARA6,A.DARA7,A.DARA8,A.DARA9 FROM STOK AS S LEFT OUTER JOIN ARTETIKETDETAY AS A ON A.STOKID = S.STOKID WHERE    KODU LIKE 'S91%' AND HLISTE=1 AND  (ISNULL(S.KKALDIR, 0) = 0) AND (S.TURU = 'Hammadde') ORDER BY S.KODU", false);
     _dtStok      = new DataTable();
     _dtStok.Load(_sqlProvider.ExecuteReader());
 }