Beispiel #1
0
        public List <DTOTanimDetay> sorulistele()
        {
            List <DTOTanimDetay> sorulistesi = new List <DTOTanimDetay>();

            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("select * from sgt_tanimdetay where tanim_id in ('4')", Globals.Globals.con);
            var          rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                //AÇIKLAMA: Detay1 : Tanim Kodu, Detay2 : Tanim Adi, Detay3 : Soru Adi , Detay4: İnput Tipi
                DTOTanimDetay detay = new DTOTanimDetay();
                detay.id     = Convert.ToInt16(rd.GetString("id"));
                detay.Detay1 = rd.GetString("detay1");
                detay.Detay2 = rd.GetString("detay2");
                detay.Detay3 = rd.GetString("detay3");
                detay.Detay4 = rd.GetString("detay4");
                detay.Detay5 = rd.GetString("detay5");
                sorulistesi.Add(detay);
            }
            Globals.Globals.con.Close();
            return(sorulistesi);
        }
        public JsonResult DuzenleComponent(DTOTanimDetay detay)
        {
            detay.id = Globals.Globals.duzenleid;
            SComponentDuzenle servicecomponentduzenle = new SComponentDuzenle();

            servicecomponentduzenle.componentduzenle(detay);
            return(Json(detay));
        }
        public ActionResult Duzenle(DTOTanimDetay dTO)
        {
            dTO.id = Globals.Globals.duzenleid;
            SDuzenleUrun serviceduzenle = new SDuzenleUrun();

            serviceduzenle.Duzenle(dTO);
            return(View("UrunTanimi"));
        }
        //Soruyu Duzenler
        public JsonResult DuzenleSoru(DTOTanimDetay detay)
        {
            detay.id = Globals.Globals.duzenleid;
            SSoruDuzenle servicesoruduzenle = new SSoruDuzenle();

            servicesoruduzenle.soruduzenle(detay);
            return(Json(detay));
        }
        //Cevabı Duzenler
        public JsonResult DuzenleCevap(DTOTanimDetay detay)
        {
            detay.id = Globals.Globals.duzenleid;
            SCevapDuzenle servicecevapduzenle = new SCevapDuzenle();

            servicecevapduzenle.CevapDuzenle(detay);
            return(Json(detay));
        }
        public void guncellecomponent(DTOTanimDetay detay)
        {
            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("update sgt_tanimdetay set Detay1='" + detay.Detay1 + "' where id='" + detay.id + "'", Globals.Globals.con);

            cmd.ExecuteNonQuery();
            Globals.Globals.con.Close();
        }
Beispiel #7
0
        public void guncelleurun(DTOTanimDetay detay)
        {
            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("update sgt_tanimdetay set Detay1='" + detay.Detay1 + "',Detay2='" + detay.Detay2 + "',Detay3='" + detay.Detay3 + "',Detay4='" + detay.Detay4 + "',Detay5='" + detay.Detay5 + "',Detay6='" + detay.Detay6 + "',Detay7='" + detay.Detay7 + "',Detay8='" + detay.Detay8 + "',Detay9='" + detay.Detay9 + "',Detay10='" + detay.Detay10 + "' where id='" + detay.id + "'", Globals.Globals.con);

            cmd.ExecuteNonQuery();
            Globals.Globals.con.Close();
        }
 //Soruları Kaydeder.
 public JsonResult SoruKaydet(DTOTanimDetay detay)
 {
     if (detay.Detay1 != null && detay.Detay2 != null && detay.Detay3 != null && detay.Detay4 != null && detay.Detay5 != null)
     {
         SSoruKaydet servicesorukaydet = new SSoruKaydet();
         servicesorukaydet.sorukaydet(detay);
         return(Json(detay));
     }
     else
     {
         return(Json("boş"));
     }
 }
 //Cevap Kaydeder.
 public JsonResult CevapKaydet(DTOTanimDetay detay)
 {
     if (detay.Detay1 != null && detay.Detay2 != null && detay.Detay3 != null && detay.Detay4 != null)
     {
         SCevapEkle servicecevapekle = new SCevapEkle();
         servicecevapekle.EkleCevap(detay);
         return(Json(detay));
     }
     else
     {
         return(Json("boş"));
     }
 }
 //Component Ekler.
 public JsonResult ComponentKaydet(DTOTanimDetay detay)
 {
     if (detay.Detay1 != null)
     {
         SComponentKaydet servicecomponentkaydet = new SComponentKaydet();
         servicecomponentkaydet.componentekle(detay);
         return(Json(detay));
     }
     else
     {
         return(Json("boş"));
     }
 }
        //Düzenlenen Sorunun Verilerini Getir-Götür İşlemi
        public JsonResult DuzenleGetirSoru(int id)
        {
            Globals.Globals.duzenleid = id;
            SSoruListele  servicesoru = new SSoruListele();
            DTOTanimDetay detay       = new DTOTanimDetay();

            foreach (var item in servicesoru.soruistele())
            {
                if (item.id == id)
                {
                    detay = item;
                }
            }
            return(Json(detay));
        }
        //Düzenlenen Ürünün Verilerini Getir-Götür işlemi

        public JsonResult DuzenleGetirUrun(int id)
        {
            Globals.Globals.duzenleid = id;
            SUrunListele  serviceurun = new SUrunListele();
            DTOTanimDetay detay       = new DTOTanimDetay();

            foreach (var item in serviceurun.listeleurun())
            {
                if (item.id == id)
                {
                    detay = item;
                }
            }
            return(Json(detay));
        }
        //Düzenlenen Sorunun Verilerini Getir-Götür işlemi
        public JsonResult DuzenleGetirComponent(int id)
        {
            Globals.Globals.duzenleid = id;
            SComponentListele servicecomponent = new SComponentListele();
            DTOTanimDetay     detay            = new DTOTanimDetay();

            foreach (var item in servicecomponent.componentlistele())
            {
                if (item.id == id)
                {
                    detay = item;
                }
            }
            return(Json(detay));
        }
        //Düzenlenen Sorunun Verilerini Getir-Götür işlemi
        public JsonResult DuzenleGetirCevap(int id)
        {
            Globals.Globals.duzenleid = id;
            SCevapListele servicecevap = new SCevapListele();
            DTOTanimDetay detay        = new DTOTanimDetay();

            foreach (var item in servicecevap.cevaplistesi())
            {
                if (item.id == id)
                {
                    detay = item;
                }
            }
            return(Json(detay));
        }
        public List <string> CevapGetir(DTOTanimDetay detay)
        {
            List <String> cevaplistesi = new List <String>();

            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("select Detay4 from sgt_tanimdetay where Detay3='" + detay.Detay3 + "' and tanim_id='5' ", Globals.Globals.con);
            var          rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                cevaplistesi.Add(rd.GetString(0));
            }
            Globals.Globals.con.Close();
            return(cevaplistesi);
        }
Beispiel #16
0
        public List <DTOTanimDetay> componentlistele()
        {
            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand         cmd = new MySqlCommand("select id,detay1 from sgt_tanimdetay where tanim_id='6'", Globals.Globals.con);
            List <DTOTanimDetay> componentlistesi = new List <DTOTanimDetay>();
            var rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                DTOTanimDetay detay = new DTOTanimDetay();
                detay.id     = Convert.ToInt16(rd.GetString("id"));
                detay.Detay1 = rd.GetString("Detay1");
                componentlistesi.Add(detay);
            }
            Globals.Globals.con.Close();
            return(componentlistesi);
        }
        public void sorukaydet(DTOTanimDetay detay)
        {
            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("insert into sgt_tanimdetay(tanim_id, Detay1, Detay2, Detay3, Detay4,Detay5) values('4', '" + detay.Detay1 + "', '" + detay.Detay2 + "', '" + detay.Detay3 + "', '" + detay.Detay4 + "','" + detay.Detay5 + "')", Globals.Globals.con);

            cmd.ExecuteNonQuery();
            cmd = new MySqlCommand("select max(id) from sgt_tanimdetay", Globals.Globals.con);
            var rd            = cmd.ExecuteReader();
            int tanimdetay_id = 0;

            while (rd.Read())
            {
                tanimdetay_id = Convert.ToInt16(rd.GetString(0));
            }
            rd.Close();
            cmd = new MySqlCommand("insert into `sgt_tanimdetayaciklamasi`(`tanimdetay_id`,`Detay1`,`Detay2`,`Detay3`,`Detay4`,`Detay5`,`Detay6`,`Detay7`,`Detay8`,`Detay9`,`Detay10`) values('" + tanimdetay_id + "', 'TanimKodu', 'TanimAdi', 'SoruAdi', 'İnputTipi', 'SoruKodu', '', '', '', '', '')", Globals.Globals.con);
            cmd.ExecuteNonQuery();
            Globals.Globals.con.Close();
        }
Beispiel #18
0
        public List <DTOTanimDetay> kaskosoru(DTOTanimDetay detay)
        {
            if (Globals.Globals.con.State == System.Data.ConnectionState.Open)
            {
                Globals.Globals.con.Close();
            }
            Globals.Globals.con.Open();
            MySqlCommand         cmd = new MySqlCommand("select * from sgt_tanimdetay where Detay1='" + detay.Detay1 + "' and Detay2='" + detay.Detay2 + "' and tanim_id='4';", Globals.Globals.con);
            var                  rd  = cmd.ExecuteReader();
            List <DTOTanimDetay> kaskosorulistesi = new List <DTOTanimDetay>();

            while (rd.Read())
            {
                DTOTanimDetay detayekle = new DTOTanimDetay();
                detayekle.Detay3 = rd.GetString("Detay3");
                detayekle.Detay4 = rd.GetString("Detay4");
                detayekle.Detay5 = rd.GetString("Detay5");
                kaskosorulistesi.Add(detayekle);
            }
            Globals.Globals.con.Close();
            return(kaskosorulistesi);
        }
        public List <DTOTanimDetay> cevaplistesi()
        {
            List <DTOTanimDetay> detaylistesi = new List <DTOTanimDetay>();

            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("select id,Detay1,Detay2,Detay3,Detay4 from sgt_tanimdetay where tanim_id in ('5')", Globals.Globals.con);
            var          rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                DTOTanimDetay tanimdetay = new DTOTanimDetay();
                tanimdetay.id     = Convert.ToInt16(rd.GetString("id"));
                tanimdetay.Detay1 = rd.GetString("Detay1");
                tanimdetay.Detay2 = rd.GetString("Detay2");
                tanimdetay.Detay3 = rd.GetString("Detay3");
                tanimdetay.Detay4 = rd.GetString("Detay4");
                detaylistesi.Add(tanimdetay);
            }
            Globals.Globals.con.Close();
            return(detaylistesi);
        }
        public List <DTOTanimDetay> GetirKaskoSoru(DTOTanimDetay detay)
        {
            EGetirKaskoSoru egetir = new EGetirKaskoSoru();

            return(egetir.kaskosoru(detay));
        }
        public void componentduzenle(DTOTanimDetay detay)
        {
            EComponentDuzenle ecomponent = new EComponentDuzenle();

            ecomponent.guncellecomponent(detay);
        }
Beispiel #22
0
        public void componentekle(DTOTanimDetay detay)
        {
            EComponentEkle ecomponent = new EComponentEkle();

            ecomponent.ComponentEkle(detay);
        }
        public void sorukaydet(DTOTanimDetay detay)
        {
            ESoruKaydet eSoruKaydet = new ESoruKaydet();

            eSoruKaydet.sorukaydet(detay);
        }
Beispiel #24
0
        public void Duzenle(DTOTanimDetay detay)
        {
            EUrunDuzenle eurunduzenle = new EUrunDuzenle();

            eurunduzenle.guncelleurun(detay);
        }
Beispiel #25
0
        public List <String> GetirCevap(DTOTanimDetay detay)
        {
            EGetirCevap cevap = new EGetirCevap();

            return(cevap.CevapGetir(detay));
        }
        public void EkleCevap(DTOTanimDetay detay)
        {
            ECevapEkle eCevapEkle = new ECevapEkle();

            eCevapEkle.EkleCevap(detay);
        }
Beispiel #27
0
        public List <DTOTanimDetay> urunlistele()
        {
            List <DTOTanimDetay> urunlistesi = new List <DTOTanimDetay>();

            if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
            {
                Globals.Globals.con.Open();
            }
            MySqlCommand cmd = new MySqlCommand("select * from sgt_tanimdetay where tanim_id=2", Globals.Globals.con);
            var          rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                DTOTanimDetay detay = new DTOTanimDetay();
                detay.id       = Convert.ToInt16(rd.GetString("id"));
                detay.tanim_id = Convert.ToInt16(rd.GetString("tanim_id"));
                if (!rd.IsDBNull(rd.GetOrdinal("Detay1")))
                {
                    detay.Detay1 = rd.GetString("Detay1");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay2")))
                {
                    detay.Detay2 = rd.GetString("Detay2");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay3")))
                {
                    detay.Detay3 = rd.GetString("Detay3");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay4")))
                {
                    detay.Detay4 = rd.GetString("Detay4");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay5")))
                {
                    detay.Detay5 = rd.GetString("Detay5");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay6")))
                {
                    detay.Detay6 = rd.GetString("Detay6");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay7")))
                {
                    detay.Detay7 = rd.GetString("Detay7");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay8")))
                {
                    detay.Detay8 = rd.GetString("Detay8");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay9")))
                {
                    detay.Detay9 = rd.GetString("Detay9");
                }
                if (!rd.IsDBNull(rd.GetOrdinal("Detay10")))
                {
                    detay.Detay10 = rd.GetString("Detay10");
                }
                urunlistesi.Add(detay);
            }
            Globals.Globals.con.Close();
            return(urunlistesi);
        }
        public string SatisKasko(List <String> satisevraklari)
        {
            EMusteriDogrula emusteribul = new EMusteriDogrula();

            if (emusteribul.musteridogrula(satisevraklari[0]) == "Müşteri Bulunamadi")
            {
                return(emusteribul.musteridogrula(satisevraklari[0]));
            }
            else if (emusteribul.musteridogrula(satisevraklari[1]) == "Müşteri Bulunamadi")
            {
                return(emusteribul.musteridogrula(satisevraklari[1]));
            }
            else
            {
                int policenumarası = 0;
                List <DTOTanimDetay> satiskimligi = new List <DTOTanimDetay>();
                DTOTanimDetay        satiskimlik  = new DTOTanimDetay();
                DTOTanimDetay        satiskimlik2 = new DTOTanimDetay();
                satiskimlik.tanim_id  = 8;
                satiskimlik2.tanim_id = 8;
                satiskimlik.Detay2    = emusteribul.musteridogrula(satisevraklari[0]);
                satiskimlik2.Detay2   = emusteribul.musteridogrula(satisevraklari[0]);
                satiskimlik.Detay3    = "1";
                satiskimlik2.Detay3   = "2";
                XElement        SatisKasko = new XElement("Satis");
                XElement        yenibilgi;
                int             i                = 0;
                EGetirKaskoSoru SoruGetir        = new EGetirKaskoSoru();
                DTOTanimDetay   detay            = new DTOTanimDetay();
                DTOTanimDetay   satiskaskodetayi = new DTOTanimDetay();
                detay.Detay1 = "ComponentTanimi";
                detay.Detay2 = "Müsteri Componenti";
                foreach (var item in SoruGetir.kaskosoru(detay))
                {
                    yenibilgi = new XElement(item.Detay5);
                    yenibilgi.Add(satisevraklari[i]);
                    SatisKasko.Add(yenibilgi);
                    i++;
                }
                SoruGetir    = new EGetirKaskoSoru();
                detay        = new DTOTanimDetay();
                detay.Detay1 = "UrunTanimi";
                detay.Detay2 = "Kasko";
                foreach (var item in SoruGetir.kaskosoru(detay))
                {
                    yenibilgi = new XElement(item.Detay5);
                    yenibilgi.Add(satisevraklari[i]);
                    SatisKasko.Add(yenibilgi);
                    i++;
                }
                int j = i;
                SoruGetir    = new EGetirKaskoSoru();
                detay        = new DTOTanimDetay();
                detay.Detay1 = "ComponentTanimi";
                detay.Detay2 = "Satis Componenti";
                foreach (var item in SoruGetir.kaskosoru(detay))
                {
                    yenibilgi = new XElement(item.Detay5);
                    yenibilgi.Add(satisevraklari[i]);
                    SatisKasko.Add(yenibilgi);
                    i++;
                }
                if (Globals.Globals.con.State == System.Data.ConnectionState.Closed)
                {
                    Globals.Globals.con.Open();
                }
                MySqlCommand policeno = new MySqlCommand("select (max(Detay8)) from sgt_tanimdetay;", Globals.Globals.con);
                var          rd       = policeno.ExecuteReader();
                while (rd.Read())
                {
                    policenumarası = Convert.ToInt16(rd.GetString(0)) + 1;
                }
                satiskimlik.Detay1        = policenumarası.ToString();
                satiskimlik2.Detay1       = policenumarası.ToString();
                satiskaskodetayi.tanim_id = 7;
                satiskaskodetayi.Detay1   = "Kasko";
                satiskaskodetayi.Detay2   = SatisKasko.ToString();
                satiskaskodetayi.Detay3   = satisevraklari[j];
                satiskaskodetayi.Detay4   = satisevraklari[j + 1];
                satiskaskodetayi.Detay5   = satisevraklari[j + 2];
                satiskaskodetayi.Detay6   = satisevraklari[j + 3];
                satiskaskodetayi.Detay7   = satisevraklari[j + 4];
                satiskaskodetayi.Detay8   = (policenumarası).ToString();
                satiskaskodetayi.Detay9   = "10";
                satiskaskodetayi.Detay10  = "10";
                satiskimligi.Add(satiskimlik);
                satiskimligi.Add(satiskimlik2);
                rd.Close();
                MySqlCommand cmd = new MySqlCommand("insert into sgt_tanimdetay(`tanim_id`,`Detay1`,`Detay2`,`Detay3`,`Detay4`,`Detay5`,`Detay6`,`Detay7`,`Detay8`,`Detay9`,`Detay10`) values('" + satiskaskodetayi.tanim_id + "','" + satiskaskodetayi.Detay1 + "','" + satiskaskodetayi.Detay2 + "','" + satiskaskodetayi.Detay3 + "','" + satiskaskodetayi.Detay4 + "','" + satiskaskodetayi.Detay5 + "','" + satiskaskodetayi.Detay6 + "','" + satiskaskodetayi.Detay7 + "','" + satiskaskodetayi.Detay8 + "','" + satiskaskodetayi.Detay9 + "','" + satiskaskodetayi.Detay10 + "')", Globals.Globals.con);
                cmd.ExecuteNonQuery();
                cmd = new MySqlCommand("select max(id) from sgt_tanimdetay", Globals.Globals.con);
                rd  = cmd.ExecuteReader();
                int tanimdetay_id = 0;
                while (rd.Read())
                {
                    tanimdetay_id = Convert.ToInt16(rd.GetString(0));
                }
                rd.Close();
                cmd = new MySqlCommand("insert into `sgt_tanimdetayaciklamasi`(`tanimdetay_id`,`Detay1`,`Detay2`,`Detay3`,`Detay4`,`Detay5`,`Detay6`,`Detay7`,`Detay8`,`Detay9`,`Detay10`) values('" + tanimdetay_id + "', 'TanimKodu', 'SatisXML', 'Baslangic', 'Bitis', 'HesapNo', 'OdemeAraci', 'Teminat', 'PoliceNo', 'Tutar1', 'Tutar2')", Globals.Globals.con);
                cmd.ExecuteNonQuery();
                foreach (var item in satiskimligi)
                {
                    cmd = new MySqlCommand("insert into sgt_tanimdetay(`tanim_id`,`Detay1`,`Detay2`,`Detay3`,`Detay4`,`Detay5`,`Detay6`,`Detay7`,`Detay8`,`Detay9`,`Detay10`) values('" + item.tanim_id + "','" + item.Detay1 + "','" + item.Detay2 + "','" + item.Detay3 + "','','','','','','','')", Globals.Globals.con);
                    cmd.ExecuteNonQuery();
                    cmd = new MySqlCommand("select max(id) from sgt_tanimdetay", Globals.Globals.con);
                    rd  = cmd.ExecuteReader();
                    while (rd.Read())
                    {
                        tanimdetay_id = Convert.ToInt16(rd.GetString(0));
                    }
                    rd.Close();
                    cmd = new MySqlCommand("insert into `sgt_tanimdetayaciklamasi`(`tanimdetay_id`,`Detay1`,`Detay2`,`Detay3`,`Detay4`,`Detay5`,`Detay6`,`Detay7`,`Detay8`,`Detay9`,`Detay10`) values('" + tanimdetay_id + "', 'Poliçe ID', 'Müşteri NO', 'Sigorta Kişi Tipi', '', '', '', '', '', '', '')", Globals.Globals.con);
                    cmd.ExecuteNonQuery();
                }
                Globals.Globals.con.Close();
                return("ÜrünSatildi\n" + SatisKasko.ToString());
            }
        }
Beispiel #29
0
        public void soruduzenle(DTOTanimDetay detay)
        {
            ESoruDuzenle soruDuzenle = new ESoruDuzenle();

            soruDuzenle.guncellesoru(detay);
        }
        public void CevapDuzenle(DTOTanimDetay detay)
        {
            ECevapDuzenle cevapDuzenle = new ECevapDuzenle();

            cevapDuzenle.guncellecevap(detay);
        }