Exemple #1
0
    protected void CariBilgileriniGetir(int numarator_id)
    {
        string queryString = "SELECT * FROM banka_pos_kayit WHERE pos_id=" + numarator_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    lbl_pos_id.Text        = reader["pos_id"].ToString();
                    txt_pos_banka_adi.Text = reader["pos_banka_adi"].ToString();
                    dd_bagli_olan_banka_hesap_id.SelectedValue = reader["bagli_olan_banka_hesap_id"].ToString();
                    txt_tahakkuk_gun_sayisi.Text = reader["tahakkuk_gun_sayisi"].ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error VeriSorgula. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #2
0
    protected void CariBilgileriniGetir(int numarator_id)
    {
        string queryString = "SELECT * FROM personel_islem_tipi_tanimlama WHERE islem_tipi_id=" + numarator_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    lbl_personel_islem_tipi_id.Text  = reader["islem_tipi_id"].ToString();
                    txt_personel_islem_tipi_adi.Text = reader["islem_tipi_adi"].ToString();
                    txt_personel_islem_tipi_islem_tipi_aciklama1.Text = reader["islem_tipi_aciklama1"].ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error VeriSorgula. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #3
0
    protected void VeriListele()
    {
        string hareketSQL = "SELECT * FROM personel_islem_tipi_tanimlama";
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(hareketSQL, connection);

        int updated = 0;

        try
        {
            updated = cmd.ExecuteNonQuery();
            SqlDataAdapter da         = new SqlDataAdapter(cmd);
            DataSet        ds_hareket = new DataSet();
            da.Fill(ds_hareket);

            gv_listele.DataSource = ds_hareket;
            gv_listele.DataBind();

            //lblResults.Text = updated.ToString() + " record updated.";
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Listele. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }

        if (updated > 0)
        {
            //
        }
    }
Exemple #4
0
    protected void GelirGiderEkle()
    {
        string queryString = "INSERT INTO kasa_gelir_gider_tanimlama (gelir_gider_adi,gelir_or_gider) VALUES \n" +
                             "(@gelir_gider_adi,@gelir_or_gider)";
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@gelir_gider_adi", SqlDbType.NVarChar).Value = txt_gelir_gider_adi.Text;
            cmd.Parameters.Add("@gelir_or_gider", SqlDbType.NVarChar).Value  = dd_gelir_or_gider.SelectedValue;


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Login. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #5
0
    protected void StokHareketGirisCikisKaydet(string stok_id, string kayit_tarihi, string giris_or_cikis, string islem_tipi, string miktar, string birim, string aciklama1, string birim_fiyat, string iskonto, string kdv, string tutar, string cari_id, string evrak_no, string fis, string fatura)
    {
        //string queryString = "INSERT INTO [dbo].[stok_hareket]  ([stok_id],[kayit_tarihi],[giris_or_cikis],[islem_tipi] ,[miktar] ,[evrak_no] ,[aciklama1]) VALUES (@stok_id,@kayit_tarihi,@giris_or_cikis,@islem_tipi,@miktar,@evrak_no,@aciklama1)";
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand("StokHareketEkle", connection);

        int insert_sql = 0;

        try
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@stok_id", SqlDbType.Int).Value             = stok_id;
            cmd.Parameters.Add("@kayit_tarihi", SqlDbType.DateTime).Value   = Convert.ToDateTime(kayit_tarihi);
            cmd.Parameters.Add("@giris_or_cikis", SqlDbType.NVarChar).Value = giris_or_cikis;
            cmd.Parameters.Add("@islem_tipi", SqlDbType.NVarChar).Value     = islem_tipi;
            cmd.Parameters.Add("@miktar", SqlDbType.Int).Value         = Convert.ToInt32(miktar);
            cmd.Parameters.Add("@evrak_no", SqlDbType.NVarChar).Value  = evrak_no;
            cmd.Parameters.Add("@aciklama1", SqlDbType.NVarChar).Value = aciklama1;



            insert_sql = cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            cmd.Parameters.Clear();
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
    protected void gv_listele_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int           fatura_stok_hareket_id = Convert.ToInt32(gv_listele.DataKeys[e.RowIndex].Value);
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand("FaturaHareketSilTemp", connection);

        int sql_query = 0;

        try
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@fatura_stok_hareket_id", SqlDbType.Int).Value = fatura_stok_hareket_id;

            sql_query = cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Fatura Hareket rowdeleting. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            cmd.Parameters.Clear();
            baglan.VeritabaniBaglantiyiKapat(connection);
            FaturaTutarlariniHesapla(lbl_cari_id.Text);
            CariFaturaHareketListesiniGetir(Convert.ToInt32(lbl_cari_id.Text)); // fatura_stok_hareket_temp
        }
    }
    protected void FaturaTutarlariniHesapla(string cari_id)
    {
        string queryString = "SELECT SUM(kdvsiz_tutar) AS kdvsiz_tutar,SUM(kdv_tutari) AS kdv_tutari,SUM(tutar) AS tutar FROM fatura_stok_hareket_temp WHERE onay_verildi_mi=0 and cari_id=" + cari_id;

        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    txt_ara_toplam.Text   = reader["kdvsiz_tutar"].ToString();
                    txt_kdv_toplam.Text   = reader["kdv_tutari"].ToString();
                    txt_genel_toplam.Text = reader["tutar"].ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Fatura Toplamlarını Getir. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
    protected void BankaEkle()
    {
        string queryString = "INSERT INTO banka_kayit (banka_adi,hesap_sahibi,sube_kodu,hesap_no,iban,aktif_or_pasif,para_birimi_id) VALUES \n" +
                             "(@banka_adi,@hesap_sahibi,@sube_kodu,@hesap_no,@iban,@aktif_or_pasif,@para_birimi_id)";

        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@banka_adi", SqlDbType.NVarChar).Value      = txt_banka_adi.Text;
            cmd.Parameters.Add("@hesap_sahibi", SqlDbType.NVarChar).Value   = txt_hesap_sahibi.Text;
            cmd.Parameters.Add("@sube_kodu", SqlDbType.NVarChar).Value      = txt_sube_kodu.Text;
            cmd.Parameters.Add("@hesap_no", SqlDbType.NVarChar).Value       = txt_hesap_no.Text;
            cmd.Parameters.Add("@iban", SqlDbType.NVarChar).Value           = txt_iban_no.Text;
            cmd.Parameters.Add("@aktif_or_pasif", SqlDbType.NVarChar).Value = dd_aktif_or_pasif.SelectedValue;
            cmd.Parameters.Add("@para_birimi_id", SqlDbType.Int).Value      = Convert.ToInt32(dd_para_birimi.SelectedValue);



            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
    protected void BankaGuncelle(int anahtar_id)
    {
        string queryString = "UPDATE banka_kayit SET banka_adi=@banka_adi,hesap_sahibi=@hesap_sahibi,sube_kodu=@sube_kodu,hesap_no=@hesap_no, \n" +
                             "iban=@iban,aktif_or_pasif=@aktif_or_pasif,para_birimi_id=@para_birimi_id WHERE banka_hesap_id=" + anahtar_id;
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@banka_adi", SqlDbType.NVarChar).Value      = txt_banka_adi.Text;
            cmd.Parameters.Add("@hesap_sahibi", SqlDbType.NVarChar).Value   = txt_hesap_sahibi.Text;
            cmd.Parameters.Add("@sube_kodu", SqlDbType.NVarChar).Value      = txt_sube_kodu.Text;
            cmd.Parameters.Add("@hesap_no", SqlDbType.NVarChar).Value       = txt_hesap_no.Text;
            cmd.Parameters.Add("@iban", SqlDbType.NVarChar).Value           = txt_iban_no.Text;
            cmd.Parameters.Add("@aktif_or_pasif", SqlDbType.NVarChar).Value = dd_aktif_or_pasif.SelectedValue;
            cmd.Parameters.Add("@para_birimi_id", SqlDbType.Int).Value      = Convert.ToInt32(dd_para_birimi.SelectedValue);

            //Response.Write(cmd.CommandText);


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Update. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #10
0
    protected void VeriGuncelle(int numarator_id)
    {
        string queryString = "UPDATE yetki_grubu SET yetki_adi=@yetki_adi,yetki_aciklama=@yetki_aciklama,Genel=@Genel,Cari=@Cari,Stok=@Stok,Personel=@Personel,Kasa=@Kasa,Randevu=@Randevu,Mesaj=@Mesaj WHERE yetki_id=" + numarator_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);



        try
        {
            cmd.Parameters.Add("@yetki_adi", SqlDbType.NVarChar).Value      = txt_yetki_adi.Text;
            cmd.Parameters.Add("@yetki_aciklama", SqlDbType.NVarChar).Value = txt_yetki_aciklama.Text;
            cmd.Parameters.Add("@Genel", SqlDbType.Bit).Value    = cb_genel.Checked;
            cmd.Parameters.Add("@Cari", SqlDbType.Bit).Value     = cb_cari.Checked;
            cmd.Parameters.Add("@Stok", SqlDbType.Bit).Value     = cb_stok.Checked;
            cmd.Parameters.Add("@Personel", SqlDbType.Bit).Value = cb_personel.Checked;
            cmd.Parameters.Add("@Kasa", SqlDbType.Bit).Value     = cb_kasa.Checked;
            cmd.Parameters.Add("@Randevu", SqlDbType.Bit).Value  = cb_randevu.Checked;
            cmd.Parameters.Add("@Mesaj", SqlDbType.Bit).Value    = cb_mesaj.Checked;
            cmd.ExecuteNonQuery();

            //Response.Write(cmd.CommandText);


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error UPDATE. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
    protected void gv_listele_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int numarator_id = Convert.ToInt32(gv_listele.DataKeys[e.RowIndex].Value);

        string        queryString = "DELETE FROM banka_kayit WHERE banka_hesap_id=" + numarator_id;
        ConnVt        baglan      = new ConnVt();
        SqlConnection connection  = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd         = new SqlCommand(queryString, connection);

        try
        {
            cmd.ExecuteNonQuery();
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Deleting ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
            BankaListele();
        }
    }
Exemple #12
0
    protected void VeriEkle()
    {
        string queryString = "INSERT INTO yetki_grubu (yetki_adi,yetki_aciklama,Genel,Cari,Stok,Personel,Kasa,Randevu,Mesaj) VALUES \n" +
                             "(@yetki_adi,@yetki_aciklama,@Genel,@Cari,@Stok,@Personel,@Kasa,@Randevu,@Mesaj)";
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@yetki_adi", SqlDbType.NVarChar).Value      = txt_yetki_adi.Text;
            cmd.Parameters.Add("@yetki_aciklama", SqlDbType.NVarChar).Value = txt_yetki_aciklama.Text;
            cmd.Parameters.Add("@Genel", SqlDbType.Bit).Value    = cb_genel.Checked;
            cmd.Parameters.Add("@Cari", SqlDbType.Bit).Value     = cb_cari.Checked;
            cmd.Parameters.Add("@Stok", SqlDbType.Bit).Value     = cb_stok.Checked;
            cmd.Parameters.Add("@Personel", SqlDbType.Bit).Value = cb_personel.Checked;
            cmd.Parameters.Add("@Kasa", SqlDbType.Bit).Value     = cb_kasa.Checked;
            cmd.Parameters.Add("@Randevu", SqlDbType.Bit).Value  = cb_randevu.Checked;
            cmd.Parameters.Add("@Mesaj", SqlDbType.Bit).Value    = cb_mesaj.Checked;
            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #13
0
    protected void VeriGuncelle(int numarator_id)
    {
        string queryString = "UPDATE banka_pos_kayit SET pos_banka_adi=@pos_banka_adi,bagli_olan_banka_hesap_id=@bagli_olan_banka_hesap_id,tahakkuk_gun_sayisi=@tahakkuk_gun_sayisi WHERE pos_id=" + numarator_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);



        try
        {
            cmd.Parameters.Add("@pos_banka_adi", SqlDbType.NVarChar).Value        = txt_pos_banka_adi.Text;
            cmd.Parameters.Add("@bagli_olan_banka_hesap_id", SqlDbType.Int).Value = dd_bagli_olan_banka_hesap_id.SelectedValue;
            cmd.Parameters.Add("@tahakkuk_gun_sayisi", SqlDbType.Int).Value       = txt_tahakkuk_gun_sayisi.Text;


            //Response.Write(cmd.CommandText);


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error UPDATE. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #14
0
    protected void VeriEkle()
    {
        string queryString = "INSERT INTO banka_pos_kayit (pos_banka_adi,bagli_olan_banka_hesap_id,tahakkuk_gun_sayisi) VALUES \n" +
                             "(@pos_banka_adi,@bagli_olan_banka_hesap_id,@tahakkuk_gun_sayisi)";
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@pos_banka_adi", SqlDbType.NVarChar).Value        = txt_pos_banka_adi.Text;
            cmd.Parameters.Add("@bagli_olan_banka_hesap_id", SqlDbType.Int).Value = dd_bagli_olan_banka_hesap_id.SelectedValue;
            cmd.Parameters.Add("@tahakkuk_gun_sayisi", SqlDbType.Int).Value       = txt_tahakkuk_gun_sayisi.Text;


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #15
0
    protected void KasaEkle()
    {
        string queryString = "INSERT INTO kasa_kayit (kasa_adi,para_birimi_id,aciklama1) VALUES \n" +
                             "(@kasa_adi,@para_birimi_id,@aciklama1)";
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@kasa_adi", SqlDbType.NVarChar).Value  = txt_kasa_adi.Text;
            cmd.Parameters.Add("@para_birimi_id", SqlDbType.Int).Value = Convert.ToInt32(dd_para_birimi.SelectedValue);
            cmd.Parameters.Add("@aciklama1", SqlDbType.NVarChar).Value = txt_aciklama.Text;


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Login. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
    protected void VeriEkle()
    {
        string queryString = "INSERT INTO personel_departman_tanimlama (personel_departman_adi,personel_departman_aciklama1) VALUES \n" +
                             "(@personel_departman_adi,@personel_departman_aciklama1)";

        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@personel_departman_adi", SqlDbType.NVarChar).Value       = txt_personel_departman_adi.Text;
            cmd.Parameters.Add("@personel_departman_aciklama1", SqlDbType.NVarChar).Value = txt_personel_departman_aciklama1.Text;


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #17
0
    protected void KasaGuncelle(int kasa_id)
    {
        string queryString = "UPDATE kasa_kayit SET kasa_adi=@kasa_adi,para_birimi_id=@para_birimi_id,aciklama1=@aciklama1 WHERE kasa_id=" + kasa_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);



        try
        {
            cmd.Parameters.Add("@kasa_adi", SqlDbType.NVarChar).Value  = txt_kasa_adi.Text;
            cmd.Parameters.Add("@para_birimi_id", SqlDbType.Int).Value = Convert.ToInt32(dd_para_birimi.SelectedValue);
            cmd.Parameters.Add("@aciklama1", SqlDbType.NVarChar).Value = txt_aciklama.Text;



            //Response.Write(cmd.CommandText);


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Login. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #18
0
    protected void KullaniciEkle()
    {
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand("KullaniciEkle", connection);

        try
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@firma_id", SqlDbType.Int).Value             = dd_firma_listesi.SelectedValue;
            cmd.Parameters.Add("@kayit_tarihi", SqlDbType.DateTime).Value    = Convert.ToDateTime(txt_kayit_tarihi.Text);
            cmd.Parameters.Add("@yetki_grubu_id", SqlDbType.Int).Value       = dd_yetki_grubu_id.SelectedValue;
            cmd.Parameters.Add("@tc", SqlDbType.NVarChar).Value              = txt_tc.Text;
            cmd.Parameters.Add("@adi_soyadi", SqlDbType.NVarChar).Value      = txt_adi_soyadi.Text;
            cmd.Parameters.Add("@kullanici_adi", SqlDbType.NVarChar).Value   = txt_kullanici_adi.Text;
            cmd.Parameters.Add("@kullanici_sifre", SqlDbType.NVarChar).Value = txt_kullanici_sifre.Text;
            cmd.Parameters.Add("@gsm", SqlDbType.NVarChar).Value             = txt_gsm.Text;
            cmd.Parameters.Add("@aktif_or_pasif", SqlDbType.NVarChar).Value  = dd_aktif_or_pasif.SelectedValue;
            cmd.Parameters.Add("@aciklama1", SqlDbType.NVarChar).Value       = txt_aciklama1.Text;


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
    protected void StokBilgisiniBarkodOkuyarakGetir(string stok_barkodu)
    {
        string queryString = "SELECT stok_id,stok_barkod_no,stok_kod_no,stok_adi,birimi,kdv,satis_fiyati FROM stok_kayit WHERE stok_barkod_no='" + stok_barkodu + "'";

        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    lbl_stok_id.Text      = reader["stok_id"].ToString();
                    txt_stok_barkod.Text  = reader["stok_barkod_no"].ToString();
                    txt_stok_kodu.Text    = reader["stok_kod_no"].ToString();
                    txt_stok_adi.Text     = reader["stok_adi"].ToString();
                    txt_birimi.Text       = reader["birimi"].ToString();
                    txt_kdv.Text          = reader["kdv"].ToString();
                    txt_satis_fiyati.Text = reader["satis_fiyati"].ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Stok Bilgileri Getir. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #20
0
    protected void MesajKaydet()
    {
        string queryString;
        string kayit_tarihi = DateTime.Now.ToString("dd.MM.yyyy hh:mm:ss");

        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(database_master);

        try
        {
            queryString = "INSERT INTO dashboard (tarih,gonderici_id,gonderici_adi_soyadi,mesaj,resim_adi) VALUES \n" +
                          "(@tarih,@gonderici_id,@gonderici_adi_soyadi,@mesaj,@resim_adi)";
            SqlCommand cmd = new SqlCommand(queryString, connection);
            cmd.Parameters.Add("@tarih", SqlDbType.DateTime).Value   = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
            cmd.Parameters.Add("@gonderici_id", SqlDbType.Int).Value = Session["kullanici_id"].ToString();
            cmd.Parameters.Add("@gonderici_adi_soyadi", SqlDbType.NVarChar).Value = Session["adi_soyadi"].ToString();
            cmd.Parameters.Add("@mesaj", SqlDbType.NVarChar).Value     = txt_mesaj.Text;
            cmd.Parameters.Add("@resim_adi", SqlDbType.NVarChar).Value = lbl_resim_adi.Text;
            cmd.ExecuteNonQuery();

            img_resim.ImageUrl = "";
        }//end TRY
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
            MesajlariGetir();
        }
    }
Exemple #21
0
    protected void GelirGiderBilgileriniGetir(int gelir_gider_id)
    {
        string        queryString = "SELECT * FROM kasa_gelir_gider_tanimlama WHERE gelir_gider_id=" + gelir_gider_id;
        ConnVt        baglan      = new ConnVt();
        SqlConnection connection  = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd         = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    lbl_gelir_gider_id.Text         = reader["gelir_gider_id"].ToString();
                    txt_gelir_gider_adi.Text        = reader["gelir_gider_adi"].ToString();
                    dd_gelir_or_gider.SelectedValue = reader["gelir_or_gider"].ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Bilgileri Getir ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #22
0
    protected void CariHareketListesiniGetir(int cari_id)
    {
        string queryString = "SELECT * FROM cari_hareket WHERE cari_id=" + cari_id + " ORDER BY kayit_tarihi DESC,cari_hareket_id DESC";
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        int updated = 0;

        try
        {
            updated = cmd.ExecuteNonQuery();
            SqlDataAdapter da         = new SqlDataAdapter(cmd);
            DataSet        ds_hareket = new DataSet();
            da.Fill(ds_hareket);

            gv_listele.DataSource = ds_hareket;
            gv_listele.DataBind();

            //lblResults.Text = updated.ToString() + " record updated.";
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Cari Bulma ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }

        if (updated > 0)
        {
            //
        }
    }
Exemple #23
0
    protected void GelirGiderGuncelle(int gelir_gider_id)
    {
        string        queryString = "UPDATE kasa_gelir_gider_tanimlama SET gelir_gider_adi=@gelir_gider_adi,gelir_or_gider=@gelir_or_gider WHERE gelir_gider_id=" + gelir_gider_id;
        ConnVt        baglan      = new ConnVt();
        SqlConnection connection  = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd         = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@gelir_gider_adi", SqlDbType.NVarChar).Value = txt_gelir_gider_adi.Text;
            cmd.Parameters.Add("@gelir_or_gider", SqlDbType.NVarChar).Value  = dd_gelir_or_gider.Text;

            //Response.Write(cmd.CommandText);


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Update. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #24
0
    protected void CariBorcAlacakBilgisiniGetir(int cari_id)
    {
        string        hareketSQL = "SELECT sum(borc) AS borc,sum(alacak) AS alacak,sum(borc)-sum(alacak) AS bakiye FROM cari_hareket WHERE cari_id=" + cari_id;
        ConnVt        baglan     = new ConnVt();
        SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd        = new SqlCommand(hareketSQL, connection);


        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    txt_borc_bakiye.Text   = reader["borc"].ToString();
                    txt_alacak_bakiye.Text = reader["alacak"].ToString();
                    txt_bakiye.Text        = reader["bakiye"].ToString();
                }
            }
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Cari Bulma ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #25
0
    protected void StokBilgileriniGetir(int stok_id)
    {
        string queryString = "SELECT stok_id,stok_adi,grubu_id,giren,cikan FROM stok_kayit WHERE stok_id=" + stok_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    lbl_stok_id.Text = reader["stok_id"].ToString();

                    txt_stok_adi.Text        = reader["stok_adi"].ToString();
                    dd_grup_id.SelectedValue = reader["grubu_id"].ToString();
                    txt_giren.Text           = reader["giren"].ToString();
                    txt_cikan.Text           = reader["cikan"].ToString();
                    int stok_miktari = Convert.ToInt32(reader["giren"].ToString()) - Convert.ToInt32(reader["cikan"].ToString());
                    txt_stok_miktari.Text = stok_miktari.ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error StokBilgileriniGetir. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #26
0
    protected void KasaListele()
    {
        string hareketSQL = "SELECT dbo.kasa_kayit.*, dbo.firma_para_birimi_tanimlama.para_birimi FROM dbo.kasa_kayit INNER JOIN dbo.firma_para_birimi_tanimlama ON dbo.kasa_kayit.para_birimi_id = dbo.firma_para_birimi_tanimlama.para_birimi_id ORDER BY dbo.kasa_kayit.kasa_adi";
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(hareketSQL, connection);

        int updated = 0;

        try
        {
            updated = cmd.ExecuteNonQuery();
            SqlDataAdapter da         = new SqlDataAdapter(cmd);
            DataSet        ds_hareket = new DataSet();
            da.Fill(ds_hareket);

            gv_kasa_listele.DataSource = ds_hareket;
            gv_kasa_listele.DataBind();

            //lblResults.Text = updated.ToString() + " record updated.";
        }
        catch (Exception err)
        {
            //lblResults.Text = "Error updating author. ";
            //lblResults.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }

        if (updated > 0)
        {
            //
        }
    }
Exemple #27
0
    protected void VeriGuncelle(int numarator_id)
    {
        string queryString = "UPDATE personel_islem_tipi_tanimlama SET islem_tipi_adi=@islem_tipi_adi,islem_tipi_aciklama1=@islem_tipi_aciklama1 WHERE islem_tipi_id=" + numarator_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);



        try
        {
            cmd.Parameters.Add("@islem_tipi_adi", SqlDbType.NVarChar).Value       = txt_personel_islem_tipi_adi.Text;
            cmd.Parameters.Add("@islem_tipi_aciklama1", SqlDbType.NVarChar).Value = txt_personel_islem_tipi_islem_tipi_aciklama1.Text;


            //Response.Write(cmd.CommandText);


            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error UPDATE. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #28
0
    protected void KasaBilgileriniGetir(int kasa_id)
    {
        string queryString = "SELECT * FROM kasa_kayit WHERE kasa_id=" + kasa_id;
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    lbl_kasa_id.Text             = reader["kasa_id"].ToString();
                    dd_para_birimi.SelectedValue = reader["para_birimi_id"].ToString();
                    txt_kasa_adi.Text            = reader["kasa_adi"].ToString();
                    txt_aciklama.Text            = reader["aciklama1"].ToString();
                }
            }
        }

        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error Login. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }
Exemple #29
0
    protected void gv_listele_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int           kasa_hareket_id = Convert.ToInt32(gv_listele.DataKeys[e.RowIndex].Value);
        ConnVt        baglan          = new ConnVt();
        SqlConnection connection      = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString());
        SqlCommand    cmd             = new SqlCommand("KasaHareketSil", connection);

        int sql_query = 0;

        try
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@kasa_hareket_id", SqlDbType.Int).Value = kasa_hareket_id;

            sql_query = cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error kasa HAREKET SİLME. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            cmd.Parameters.Clear();
            baglan.VeritabaniBaglantiyiKapat(connection);
            KasaHareketListesiniGetir(Convert.ToInt32(Request.QueryString["KasaHareketID"]));
            KasaBilgileriniGetir(Convert.ToInt32(Request.QueryString["KasaHareketID"]));
        }
    }
Exemple #30
0
    protected void stokEkle()
    {
        string queryString = "INSERT INTO stok_kayit (kayit_tarihi,stok_kod_no,stok_barkod_no,stok_uretici_no,stok_adi,birimi,grubu_id,kdv,alis_fiyati,satis_fiyati) VALUES \n" +
                             "(@kayit_tarihi,@stok_kod_no,@stok_barkod_no,@stok_uretici_no,@stok_adi,@birimi,@grubu_id,@kdv,@alis_fiyati,@satis_fiyati)";
        ConnVt baglan = new ConnVt(); SqlConnection connection = baglan.VeritabaninaBaglan(Session["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(queryString, connection);

        try
        {
            cmd.Parameters.Add("@kayit_tarihi", SqlDbType.DateTime).Value    = Convert.ToDateTime(txt_kayit_tarihi.Text);
            cmd.Parameters.Add("@stok_kod_no", SqlDbType.NVarChar).Value     = txt_kod_no.Text;
            cmd.Parameters.Add("@stok_barkod_no", SqlDbType.NVarChar).Value  = txt_barkod_no.Text;
            cmd.Parameters.Add("@stok_uretici_no", SqlDbType.NVarChar).Value = txt_uretici_no.Text;
            cmd.Parameters.Add("@stok_adi", SqlDbType.NVarChar).Value        = txt_stok_adi.Text;
            cmd.Parameters.Add("@birimi", SqlDbType.NVarChar).Value          = dd_birimi.SelectedValue;
            cmd.Parameters.Add("@grubu_id", SqlDbType.NVarChar).Value        = dd_grup_id.SelectedValue;
            cmd.Parameters.Add("@kdv", SqlDbType.NVarChar).Value             = txt_kdv.Text;
            cmd.Parameters.Add("@alis_fiyati", SqlDbType.NVarChar).Value     = txt_alis_fiyati.Text;
            cmd.Parameters.Add("@satis_fiyati", SqlDbType.NVarChar).Value    = txt_satis_fiyati.Text;



            cmd.ExecuteNonQuery();
        }
        catch (Exception err)
        {
            lbl_mesaj.Text  = "Error INSERT. ";
            lbl_mesaj.Text += err.Message;
        }
        finally
        {
            baglan.VeritabaniBaglantiyiKapat(connection);
        }
    }