Example #1
0
        public ModelCollection <tbl_Demirbaslar> Listele2(bool yetki)
        {
            SQL_LISTE2 = @"SELECT DISTINCT
demirbas_id ,
demirbas_tur_id ,
tbl_Demirbaslar.daire_no ,
demirbas_adet ,
demirbas_alis_tarihi ,
demirbas_fiyati ,
demirbas_aciklama ,
demirbas_kayit_tarihi ,
demirbas_kayit_eden_yonetici_id ,
demirbas_duzenleme_tarihi ,
demirbas_kayit_duzenleyen_yonetici_id  FROM tbl_Demirbaslar WITH (NOLOCK)
INNER JOIN tbl_Daireler ON tbl_Daireler.daire_no=tbl_Demirbaslar.daire_no
INNER JOIN tbl_YoneticiBina ON tbl_YoneticiBina.bina_id=tbl_Daireler.bina_id";
            if (!yetki)
            {
                SQL_LISTE2 = SQL_LISTE2 + " WHERE yonetici_id=" + frmYoneticiGirisi.yoneticiler.Yonetici_id;
            }

            SqlParameter[] parms = new SqlParameter[] { };
            ModelCollection <tbl_Demirbaslar> liste = new ModelCollection <tbl_Demirbaslar>();

            using (SqlDataReader reader = SQLHelper.ExecuteReader(SQLHelper.BilisimLibraryDbConnectionString, CommandType.Text, SQL_LISTE2, parms))
            {
                liste.PopulateReader(reader);
            }
            return(liste);
        }
Example #2
0
        public ModelCollection <tbl_Musteriler> Listele()
        {
            SqlParameter[] parms = new SqlParameter[] { };
            ModelCollection <tbl_Musteriler> liste = new ModelCollection <tbl_Musteriler>();

            using (SqlDataReader reader = SQLHelper.ExecuteReader(SQLHelper.BilisimLibraryDbConnectionString, CommandType.Text, SQL_LISTE, parms))
            {
                liste.PopulateReader(reader);
            }
            return(liste);
        }
Example #3
0
        public ModelCollection <tbl_Daireler> faturaEklenenDaireler(string faturaAdi)
        {
            SqlParameter[] parms    = new SqlParameter[] { };
            string         sqlSorgu = "select * from tbl_Daireler where daire_no in (select tbl_OrtakFatura.daire_no from tbl_OrtakFatura INNER JOIN" +
                                      " tbl_FaturaAboneNo On tbl_OrtakFatura.fatura_abone_no = tbl_FaturaAboneNo.fatura_abone_no where tbl_FaturaAboneNo.fatura_turu_id = (select tbl_FaturaTuru.fatura_turu_id" +
                                      " from tbl_FaturaTuru where tbl_FaturaTuru.fatura_adi = '" + faturaAdi + "' ))";
            ModelCollection <tbl_Daireler> liste = new ModelCollection <tbl_Daireler>();

            using (SqlDataReader reader = SQLHelper.ExecuteReader(SQLHelper.BilisimLibraryDbConnectionString, CommandType.Text, sqlSorgu, parms))
            {
                liste.PopulateReader(reader);
            }
            return(liste);
        }