Beispiel #1
0
        /// <summary>
        /// odeme türlerini getirir
        /// </summary>
        /// <returns></returns>
        public GenericResponse <List <string> > SelectOdeme()
        {
            var returnObject = new GenericResponse <List <string> >();

            ConnectDB();

            SqlCommand sqlCommand = new SqlCommand();

            sqlCommand.CommandText = Common.CreateProcedureText(Common.odemeTable, null, null);
            sqlCommand.Connection  = conSOHATS;
            SqlDataReader dr = sqlCommand.ExecuteReader();

            var data = new List <string>();

            while (dr.Read())
            {
                var dt = SQLDBHelper.GetStringValue(dr["odemeSekli"]);
                data.Add(dt);
            }

            returnObject.Success = true;
            returnObject.Value   = data;
            endConnectDB();

            return(returnObject);
        }
Beispiel #2
0
        /// <summary>
        /// taburcu kayıtları
        /// </summary>
        /// <returns></returns>
        public GenericResponse <List <Discharged> > SelectDischarged()
        {
            var returnObject = new GenericResponse <List <Discharged> >();

            ConnectDB();
            var sqlCommand = new SqlCommand();

            sqlCommand.CommandText = Common.CreateProcedureText(Common.patientTable, null, null);
            sqlCommand.Connection  = conSOHATS;
            var dr = sqlCommand.ExecuteReader();

            var data    = new List <Discharged>();
            var patient = new Discharged();

            while (dr.Read())
            {
                patient = new Discharged
                {
                    DosyaNo     = SQLDBHelper.GetIntValue(dr["dosyano"]),
                    SevkTarihi  = SQLDBHelper.GetDateTimeValue(dr["sevktarihi"]),
                    CikisTarihi = SQLDBHelper.GetDateTimeValue(dr["cikistarihi"]),
                    Odeme       = SQLDBHelper.GetStringValue(dr["odeme"]),
                    ToplamTutar = SQLDBHelper.GetIntValue(dr["toplamtutar"])
                };

                data.Add(patient);
            }
            endConnectDB();
            returnObject.Value   = data;
            returnObject.Success = true;

            return(returnObject);
        }
Beispiel #3
0
        /// <summary>
        /// kullanıcıları getirir
        /// </summary>
        /// <returns></returns>
        public GenericResponse <List <User> > SelectUser()
        {
            var returnObject = new GenericResponse <List <User> >();

            ConnectDB();
            SqlCommand sqlCommand = new SqlCommand();

            sqlCommand.CommandText = Common.CreateProcedureText(Common.userTable, null, null);
            sqlCommand.Connection  = conSOHATS;
            SqlDataReader dr = sqlCommand.ExecuteReader();

            List <User> data = new List <User>();
            User        user;

            while (dr.Read())
            {
                user = new User
                {
                    Kodu        = SQLDBHelper.GetIntValue(dr["kodu"]),
                    Ad          = SQLDBHelper.GetStringValue(dr["ad"]),
                    Soyad       = SQLDBHelper.GetStringValue(dr["soyad"]),
                    Sifre       = SQLDBHelper.GetStringValue(dr["sifre"]),
                    Yetki       = SQLDBHelper.GetStringValue(dr["yetki"]),
                    Evtel       = SQLDBHelper.GetStringValue(dr["evtel"]),
                    CepTel      = SQLDBHelper.GetStringValue(dr["ceptel"]),
                    Adres       = SQLDBHelper.GetStringValue(dr["adres"]),
                    Unvan       = SQLDBHelper.GetStringValue(dr["unvan"]),
                    IseBaslama  = SQLDBHelper.GetDateTimeValue(dr["isebaslama"]),
                    Maas        = SQLDBHelper.GetIntValue(dr["maas"]),
                    DogumYeri   = SQLDBHelper.GetStringValue(dr["dogumyeri"]),
                    AnneAd      = SQLDBHelper.GetStringValue(dr["annead"]),
                    BabaAd      = SQLDBHelper.GetStringValue(dr["babaad"]),
                    Cinsiyet    = SQLDBHelper.GetStringValue(dr["cinsiyet"]),
                    KanGrubu    = SQLDBHelper.GetStringValue(dr["kangrubu"]),
                    MedeniHal   = SQLDBHelper.GetStringValue(dr["medenihal"]),
                    DogumTarihi = SQLDBHelper.GetDateTimeValue(dr["dogumtarihi"]),
                    TcKimlikNo  = SQLDBHelper.GetStringValue(dr["tckimlikno"]),
                    UserName    = SQLDBHelper.GetStringValue(dr["username"])
                };

                data.Add(user);
            }
            endConnectDB();
            returnObject.Value   = data;
            returnObject.Success = true;

            return(returnObject);
        }
Beispiel #4
0
        /// <summary>
        /// hasta kayıtlarını getirir
        /// </summary>
        /// <returns></returns>
        public GenericResponse <List <Patient> > SelectPatient(string[] fields, string filter)
        {
            var returnObject = new GenericResponse <List <Patient> >();

            ConnectDB();
            var sqlCommand = new SqlCommand
            {
                CommandText = Common.CreateProcedureText(Common.patientTable, fields, filter),
                Connection  = conSOHATS
            };

            var dr = sqlCommand.ExecuteReader();

            var data    = new List <Patient>();
            var patient = new Patient();

            while (dr.Read())
            {
                patient = new Patient
                {
                    TcKimlikNo        = SQLDBHelper.GetStringValue(dr["tckimlikno"]),
                    DosyaNo           = SQLDBHelper.GetIntValue(dr["dosyano"]),
                    Ad                = SQLDBHelper.GetStringValue(dr["ad"]),
                    Soyad             = SQLDBHelper.GetStringValue(dr["soyad"]),
                    DogumYeri         = SQLDBHelper.GetStringValue(dr["dogumyeri"]),
                    DogumTarihi       = SQLDBHelper.GetDateTimeValue(dr["dogumtarihi"]),
                    BabaAdi           = SQLDBHelper.GetStringValue(dr["babaadi"]),
                    AnneAdi           = SQLDBHelper.GetStringValue(dr["anneadi"]),
                    Cinsiyet          = SQLDBHelper.GetStringValue(dr["cinsiyet"]),
                    KanGrubu          = SQLDBHelper.GetStringValue(dr["kangrubu"]),
                    MedeniHal         = SQLDBHelper.GetStringValue(dr["medenihal"]),
                    Adres             = SQLDBHelper.GetStringValue(dr["adres"]),
                    Tel               = SQLDBHelper.GetStringValue(dr["tel"]),
                    KurumSicilNo      = SQLDBHelper.GetStringValue(dr["kurumsicilno"]),
                    KurumAdi          = SQLDBHelper.GetStringValue(dr["kurumadi"]),
                    YakinTel          = SQLDBHelper.GetStringValue(dr["yakintel"]),
                    YakinKurumSicilNo = SQLDBHelper.GetStringValue(dr["yakinkurumsicilno"]),
                    YakinKurumAdi     = SQLDBHelper.GetStringValue(dr["yakinkurumadi"])
                };
                data.Add(patient);
            }
            endConnectDB();
            returnObject.Value   = data;
            returnObject.Success = true;

            return(returnObject);
        }
Beispiel #5
0
        /// <summary>
        /// dosya numarası ile kayıt getirir.
        /// </summary>
        /// <param name="dosyaNo"></param>
        /// <returns></returns>
        public GenericResponse <Patient> SelectPatientByKey(int dosyaNo)
        {
            var returnObject = new GenericResponse <Patient>();

            ConnectDB();
            var cmd = new SqlCommand(Common.dosyanoilehastagetir, conSOHATS);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@dosyano", dosyaNo);
            var dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                var data = new Patient
                {
                    TcKimlikNo        = SQLDBHelper.GetStringValue(dr["tckimlikno"]),
                    DosyaNo           = SQLDBHelper.GetIntValue(dr["dosyano"]),
                    Ad                = SQLDBHelper.GetStringValue(dr["ad"]),
                    Soyad             = SQLDBHelper.GetStringValue(dr["soyad"]),
                    DogumYeri         = SQLDBHelper.GetStringValue(dr["dogumyeri"]),
                    DogumTarihi       = SQLDBHelper.GetDateTimeValue(dr["dogumtarihi"]),
                    BabaAdi           = SQLDBHelper.GetStringValue(dr["babaadi"]),
                    AnneAdi           = SQLDBHelper.GetStringValue(dr["anneadi"]),
                    Cinsiyet          = SQLDBHelper.GetStringValue(dr["cinsiyet"]),
                    KanGrubu          = SQLDBHelper.GetStringValue(dr["kangrubu"]),
                    MedeniHal         = SQLDBHelper.GetStringValue(dr["medenihal"]),
                    Adres             = SQLDBHelper.GetStringValue(dr["adres"]),
                    Tel               = SQLDBHelper.GetStringValue(dr["tel"]),
                    KurumSicilNo      = SQLDBHelper.GetStringValue(dr["kurumsicilno"]),
                    KurumAdi          = SQLDBHelper.GetStringValue(dr["kurumadi"]),
                    YakinTel          = SQLDBHelper.GetStringValue(dr["yakintel"]),
                    YakinKurumSicilNo = SQLDBHelper.GetStringValue(dr["yakinkurumsicilno"]),
                    YakinKurumAdi     = SQLDBHelper.GetStringValue(dr["yakinkurumadi"])
                };
                returnObject.Value = data;
            }

            returnObject.Success = true;
            endConnectDB();
            return(returnObject);
        }
Beispiel #6
0
        /// <summary>
        /// listeleme ekranı için filtreli veri döndürür
        /// </summary>
        /// <returns></returns>
        public GenericResponse <List <TransferListContract> > SelectGeneralList(TransferListContract contract)
        {
            var returnObject = new GenericResponse <List <TransferListContract> >();

            ConnectDB();

            var cmd = new SqlCommand(Common.genellistelemegetir, conSOHATS);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@dosyano", contract.DosyaNo);
            cmd.Parameters.AddWithValue("@tckimlikno", contract.Tckimlikno);
            cmd.Parameters.AddWithValue("@baslangictarihi", contract.SevkTarihi);
            cmd.Parameters.AddWithValue("@bitistarihi", contract.CikisTarihi);
            cmd.Parameters.AddWithValue("@taburcu", contract.Taburcu);

            SqlDataReader dr = cmd.ExecuteReader();
            List <TransferListContract> list = new List <TransferListContract>();
            TransferListContract        data;

            while (dr.Read())
            {
                data               = new TransferListContract();
                data.DosyaNo       = SQLDBHelper.GetIntValue(dr["dosyano"]);
                data.PoliklinikAdi = SQLDBHelper.GetStringValue(dr["poliklinikadi"]);
                data.HastaAdı      = SQLDBHelper.GetStringValue(dr["ad"]);
                data.HastaSoyadı   = SQLDBHelper.GetStringValue(dr["soyad"]);
                data.DoktorAdı     = SQLDBHelper.GetStringValue(dr["doktor"]);
                data.SevkTarihi    = SQLDBHelper.GetDateTimeValue(dr["sevktarihi"]);
                data.CikisTarihi   = SQLDBHelper.GetDateTimeValue(dr["cikistarihi"]);
                data.Taburcu       = SQLDBHelper.GetStringValue(dr["taburcu"]);
                data.odeme         = SQLDBHelper.GetStringValue(dr["odeme"]);
                data.ToplamTutar   = SQLDBHelper.GetIntValue(dr["toplamtutar"]);
                list.Add(data);
            }

            endConnectDB();
            returnObject.Success = true;
            returnObject.Value   = list;
            return(returnObject);
        }
Beispiel #7
0
        /// <summary>
        /// sevk select sorgusu
        /// </summary>
        /// <param name="alanlar"></param>
        /// <param name="filtre"></param>
        /// <returns></returns>
        public GenericResponse <List <Transfer> > SelectTransfer(string[] alanlar, string filtre)
        {
            var returnObject = new GenericResponse <List <Transfer> >();

            ConnectDB();
            var sqlCommand = new SqlCommand
            {
                CommandText = Common.CreateProcedureText(Common.transferTable, alanlar, filtre),
                Connection  = conSOHATS
            };
            var dr = sqlCommand.ExecuteReader();

            var data = new List <Transfer>();
            var dt   = new Transfer();

            while (dr.Read())
            {
                dt = new Transfer
                {
                    Poliklinik   = SQLDBHelper.GetStringValue(dr["poliklinik"]),
                    SevkTarihi   = SQLDBHelper.GetDateTimeValue(dr["sevktarihi"]),
                    DosyaNo      = SQLDBHelper.GetIntValue(dr["dosyano"]),
                    Sira         = SQLDBHelper.GetIntValue(dr["sira"]),
                    Saat         = SQLDBHelper.GetStringValue(dr["saat"]),
                    YapilanIslem = SQLDBHelper.GetStringValue(dr["yapilanislem"]),
                    DrKod        = SQLDBHelper.GetIntValue(dr["drkod"]),
                    Miktar       = SQLDBHelper.GetIntValue(dr["miktar"]),
                    BirimFiyat   = SQLDBHelper.GetIntValue(dr["birimfiyat"]),
                    ToplamTutar  = SQLDBHelper.GetIntValue(dr["toplamtutar"]),
                    Taburcu      = SQLDBHelper.GetStringValue(dr["taburcu"])
                };
                data.Add(dt);
            }
            endConnectDB();
            returnObject.Value   = data;
            returnObject.Success = true;

            return(returnObject);
        }
Beispiel #8
0
        /// <summary>
        /// dosya numarasına göre değer döndürür
        /// </summary>
        /// <param name="dosyano"></param>
        /// <returns></returns>
        public GenericResponse <List <Transfer> > SelectTransferByDosyaNo(int dosyano)
        {
            var returnObject = new GenericResponse <List <Transfer> >();

            ConnectDB();
            var cmd = new SqlCommand(Common.dosyanoilesevkgetir, conSOHATS);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@dosyano", dosyano);
            var dr = cmd.ExecuteReader();

            var data = new List <Transfer>();
            var dt   = new Transfer();

            while (dr.Read())
            {
                dt = new Transfer
                {
                    Poliklinik   = SQLDBHelper.GetStringValue(dr["poliklinik"]),
                    SevkTarihi   = SQLDBHelper.GetDateTimeValue(dr["sevktarihi"]),
                    DosyaNo      = SQLDBHelper.GetIntValue(dr["dosyano"]),
                    Sira         = SQLDBHelper.GetIntValue(dr["sira"]),
                    Saat         = SQLDBHelper.GetStringValue(dr["saat"]),
                    YapilanIslem = SQLDBHelper.GetStringValue(dr["yapilanislem"]),
                    DrKod        = SQLDBHelper.GetIntValue(dr["drkod"]),
                    Miktar       = SQLDBHelper.GetIntValue(dr["miktar"]),
                    BirimFiyat   = SQLDBHelper.GetIntValue(dr["birimfiyat"]),
                    ToplamTutar  = SQLDBHelper.GetIntValue(dr["toplamtutar"]),
                    Taburcu      = SQLDBHelper.GetStringValue(dr["taburcu"])
                };
                data.Add(dt);
            }
            endConnectDB();
            returnObject.Value   = data;
            returnObject.Success = true;

            return(returnObject);
        }