protected void btnDonemselKaydet_Click(object sender, EventArgs e) { string custidd = Request.QueryString["custid"]; if (!String.IsNullOrEmpty(custidd)) { int custid = Int32.Parse(custidd); DateTime basla = DateTime.Now.AddDays(-30); DateTime son = DateTime.Now; if (!String.IsNullOrEmpty(datetimepicker6.Value)) { basla = DateTime.Parse(datetimepicker6.Value); } if (!String.IsNullOrEmpty(datetimepicker7.Value)) { son = DateTime.Parse(datetimepicker7.Value); } using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaBas bas = new FaturaBas(dc); AyarCurrent ay = new AyarCurrent(dc); extre extreBilgi = bas.ExtreBilgileri(custid, ay.get(), basla, son); Session["extredonem"] = extreBilgi; string uri = "/Baski.aspx?tip=extredonem"; Response.Redirect(uri); } } }
protected void btnPrnt_Click(object sender, EventArgs e) { string custidd = Request.QueryString["custid"]; if (!String.IsNullOrEmpty(custidd)) { int custid = Int32.Parse(custidd); int gun = 3; string gunS = Request.QueryString["gun"]; if (!String.IsNullOrEmpty(gunS)) { gun = Int32.Parse(gunS); } using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaBas bas = new FaturaBas(dc); AyarCurrent ay = new AyarCurrent(dc); extre extreBilgi = bas.ExtreBilgileri(custid, gun, ay.get()); Session["extre"] = extreBilgi; string uri = "/Baski.aspx?tip=extre"; Response.Redirect(uri); } } //Session["ctrl"] = GridView2; //ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=javascript>window.open('../Print.aspx','PrintMe','height=300px,width=300px,scrollbars=1');</script>"); }
protected void btnCache_Click(object sender, EventArgs e) { using (radiusEntities dc = MyContext.Context("TOL")) { AyarCurrent cur = new AyarCurrent(dc); ayargenel ay = cur.get(); txtCache.Text = ay.sonfatura.ToString(); } }
private void yazdirmaPesin(int id, string unvan, string tc, string vd, string adres) { using (radiusEntities dc = MyContext.Context(firma)) { FaturaPrinter pri = new FaturaPrinter(dc); AyarCurrent ay = new AyarCurrent(dc); pri.PesinBas(id, unvan, tc, vd, adres, faturaGoster, ay.get().cift_taraf, firma); } }
private void yazdirmaInternet(int id) { using (radiusEntities dc = MyContext.Context(firma)) { FaturaPrinter pri = new FaturaPrinter(dc); AyarCurrent ay = new AyarCurrent(dc); pri.InternetBas(id, faturaGoster, ay.get().cift_taraf, firma); } }
protected void btnPrint_Click(object sender, EventArgs e) { if (GridView1.SelectedValue != null) { int custid = Convert.ToInt32(GridView1.SelectedValue); int gun = 365; string gunS = Request.QueryString["gun"]; if (!String.IsNullOrEmpty(gunS)) { gun = Int32.Parse(gunS); } using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaBas bas = new FaturaBas(dc); AyarCurrent ay = new AyarCurrent(dc); extre extreBilgi = bas.ExtreBilgileri(custid, gun, ay.get()); Session["extre"] = extreBilgi; string uri = "/Baski.aspx?tip=extre"; Response.Redirect(uri); } } }
private void HepsiniGoster(radiusEntities dc) { string durum = Request.QueryString["durum"]; string tip = Request.QueryString["tip"]; if (!String.IsNullOrEmpty(durum)) { //panelContents.Visible = true; baslik.Text = "BASILMIŞ FATURALAR"; btnBasilmis.Visible = true; btnGuncel.Visible = false; //arama.Visible = false; GridView1.Columns[1].Visible = false; Ara(dc); } else { baslik.Text = "BASILMAMIŞ FATURALAR"; btnBasilmis.Visible = false; btnGuncel.Visible = true; GridView1.Columns[0].Visible = false; GridView1.Columns[3].Visible = false; GridView1.Columns[4].Visible = false; if (String.IsNullOrEmpty(tip)) { tip = "Hepsi"; } DateTime baslangic = DateTime.Now.AddMonths(-1); if (!String.IsNullOrEmpty(datetimepicker6.Value)) { baslangic = DateTime.Parse(datetimepicker6.Value); } DateTime bitis = DateTime.Now; if (!String.IsNullOrEmpty(datetimepicker7.Value)) { bitis = DateTime.Parse(datetimepicker7.Value); } AyarCurrent cur = new AyarCurrent(dc); ayargenel ay = cur.get(); DateTime? sonfatura = ay.sonfatura; FaturaBas bas = new FaturaBas(dc); List <Baski_Gorunum> liste = bas.BasimListesi(firma, baslangic, bitis, tip, sonfatura); if (liste != null) { string adet = liste.Count().ToString() + " Adet"; string tutar = "Tutar: " + liste.Sum(x => x.Tutar).ToString(); string kdv = "KDV: " + liste.Sum(x => x.KDV).ToString(); string oiv = "ÖİV: " + liste.Sum(x => x.OIV).ToString(); string yekun = "Yekün: " + liste.Sum(x => x.Yekun).ToString(); txtAdet.InnerHtml = adet; txtTutar.InnerHtml = tutar; txtKDV.InnerHtml = kdv; txtOIV.InnerHtml = oiv; txtYekun.InnerHtml = yekun; } GridView1.DataSource = liste; GridView1.DataBind(); } }
protected void Button1_Click(object sender, EventArgs e) { kullanici_repo kullanici = KullaniciIslem.currentKullanici(); string kimlik = txtKimlikNo.Value; Servis_Baslama servisBilgisi = null; using (radiusEntities dc = MyContext.Context(kullanici.Firma)) { ServisIslemleri servis = new ServisIslemleri(dc); string kullaniciID = kullanici.id; string aciklama = txtServisAciklama.Text; //int urunID =Convert.ToInt32(GridView2.SelectedValue); int index = Convert.ToInt32(GridView2.SelectedIndex); int tipID = Convert.ToInt32(drdTip.SelectedValue); string atananID = "0"; if (User.IsInRole("Admin") || User.IsInRole("mudur")) { atananID = drdKullanici.SelectedValue; } int?musID = null; if (GridView1.SelectedIndex >= 0) { musID = Convert.ToInt32(GridView1.SelectedValue); } string baslik = txtBaslik.Text; string firma = kullanici.Firma; int id = Convert.ToInt32(GridView1.SelectedValue); UrunAra(id, dc); int?urunID = null; if (Session["secilenUrun"] != null) { urunID = Convert.ToInt32(Session["secilenUrun"]); } DateTime acilma_zamani = DateTime.Now; string zamanS = tarih2.Value; if (!String.IsNullOrEmpty(zamanS)) { acilma_zamani = DateTime.Parse(zamanS); } int servis_paket = Int32.Parse(drdPaketler.SelectedValue); if (servis_paket > -1) { int durum_id = servis.servisEklePaketli(servis_paket, musID, kullaniciID, aciklama, urunID, tipID, atananID, kimlik, baslik, acilma_zamani, User.Identity.Name); if (chcMail.Checked == true || chcSms.Checked == true) { MusteriIslemleri musteri = new MusteriIslemleri(dc); Radius.customer musteri_bilgileri = musteri.musteriTekR(id); if (chcMail.Checked == true) { ServisDAL.MailIslemleri mi = new MailIslemleri(dc); mi.SendingMail(musteri_bilgileri.email, musteri_bilgileri.Ad, kimlik, "baslangic", ""); } if (chcSms.Checked == true) { ServisDAL.SmsIslemleri sms = new ServisDAL.SmsIslemleri(dc); AyarIslemleri ayarimiz = new AyarIslemleri(dc); string ekMesaj = "Servis No: " + kimlik; sms.SmsGonder("durum", durum_id, ayarimiz, musteri_bilgileri.telefon, ekMesaj); } } } else { int durum_id = servis.servisEkleGorevliR(musID, kullaniciID, aciklama, urunID, tipID, atananID, kimlik, baslik, acilma_zamani, User.Identity.Name); //int durum_id = servis.servisEkleGorevliR(musID, kullaniciID, aciklama, urunID, tipID, atananID, kimlik, baslik, "sube", acilma_zamani); if (chcMail.Checked == true || chcSms.Checked == true) { MusteriIslemleri musteri = new MusteriIslemleri(dc); Radius.customer musteri_bilgileri = musteri.musteriTekR(id); if (chcMail.Checked == true) { ServisDAL.MailIslemleri mi = new MailIslemleri(dc); mi.SendingMail(musteri_bilgileri.email, musteri_bilgileri.Ad, kimlik, "baslangic", ""); } if (chcSms.Checked == true) { ServisDAL.SmsIslemleri sms = new ServisDAL.SmsIslemleri(dc); AyarIslemleri ayarimiz = new AyarIslemleri(dc); string ekMesaj = "Servis No: " + kimlik; sms.SmsGonder("durum", durum_id, ayarimiz, musteri_bilgileri.telefon, ekMesaj); } } } Session["secilenUrun"] = null; if (cbYazdir.Checked == true) { FaturaBas bas = new FaturaBas(dc); AyarCurrent ay = new AyarCurrent(dc); servisBilgisi = bas.ServisBilgileri(kimlik, ay.get()); Session["Servis_Baslama"] = servisBilgisi; } } Session["secilenUrun"] = null; if (cbYazdir.Checked == true && servisBilgisi != null) { string uri = "/Baski.aspx?tip=baslama"; Response.Redirect(uri); } else { Response.Redirect("/TeknikTeknik/ServisDetayList.aspx?kimlik=" + kimlik); } }
private void makbuzYazdir(int custid, decimal tutar, string aciklama, radiusEntities dc) { ServisDAL.AyarCurrent ay = new AyarCurrent(dc); FaturaBas bas = new FaturaBas(dc); Makbuz_Gorunum faturaBilgisi = bas.MakbuzBilgileri(custid, aciklama, ay.get(), tutar, User.Identity.Name); Session["Makbuz_Gorunum"] = faturaBilgisi; Response.Redirect("/Baski.aspx?tip=tahsilat"); }
private void goster() { if (drdDurum.SelectedValue != null) { string secilen = drdDurum.SelectedValue; int secilenIndex = drdDurum.SelectedIndex; string gonderen = ""; string mesaj = ""; string firmaTam = ""; string telefon = ""; string url = ""; string konu = ""; string adres = ""; string kritik = ""; if (secilenIndex > 0 && secilenIndex < 6) { //secilen.Equals("yaklasan_taksit") || secilen.Equals("genel") //ön tanımlı durumların hepsi için türü arayacaz using (radiusEntities dc = MyContext.Context(firma)) { Radius.mail_ayars ayar = dc.mail_ayars.Where(x => x.tur == secilen).FirstOrDefault(); if (ayar != null) { gonderen = ayar.gonderen; mesaj = ayar.body_mesaj; firmaTam = ayar.FirmaTam; telefon = ayar.Telefon; url = ayar.url; konu = ayar.konu; adres = ayar.Adres; if (ayar.aktif == true) { chcAktif.Checked = true; } else { chcAktif.Checked = false; } } else { AyarCurrent cur = new AyarCurrent(dc); var genel = cur.get(); gonderen = genel.adi; firmaTam = genel.adi; telefon = genel.tel; url = genel.web; adres = genel.adres; } } } else if (secilen.Equals("sec")) { chcAktif.Checked = false; } else { int id = Convert.ToInt32(drdDurum.SelectedValue); //durumun pozisyonuna bakalım using (radiusEntities dc = MyContext.Context(firma)) { AyarIslemleri ay = new AyarIslemleri(dc); TeknikServis.Radius.service_durums durum = ay.tekDurumR(id); Radius.mail_ayars ayar = dc.mail_ayars.Where(x => x.iliski_id == id).FirstOrDefault(); if (ayar != null) { gonderen = ayar.gonderen; mesaj = ayar.body_mesaj; firmaTam = ayar.FirmaTam; telefon = ayar.Telefon; url = ayar.url; konu = ayar.konu; adres = ayar.Adres; kritik = ayar.kritik_gun.ToString(); if (ayar.aktif == true) { chcAktif.Checked = true; } else { chcAktif.Checked = false; } } else { AyarCurrent cur = new AyarCurrent(dc); var genel = cur.get(); gonderen = genel.adi; firmaTam = genel.adi; telefon = genel.tel; url = genel.web; adres = genel.adres; } } } txtMesaj.Text = mesaj; txtGonderen.Text = gonderen; txtAdres.Text = adres; txtFirmaTam.Text = firmaTam; txtKonu.Text = konu; txtTelefon.Text = telefon; txtUrl.Text = url; } }
protected void yonlendir(string url, radiusEntities dc, int custid) { if (cbYazdir.Checked == true) { //Session["ctrl"] = yazdir; //ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=javascript>window.open('../Print.aspx','PrintMe','height=300px,width=300px,scrollbars=1');</script>"); ServisDAL.AyarCurrent ay = new AyarCurrent(dc); FaturaBas bas = new FaturaBas(dc); Makbuz_Gorunum faturaBilgisi = bas.MakbuzBilgileri(custid, txtAciklama.Text, ay.get(), 0, User.Identity.Name); Session["Makbuz_Gorunum"] = faturaBilgisi; Response.Redirect("/Baski.aspx?tip=emanet"); } else { Response.Redirect(url); } }
protected void Page_Init(object sender, EventArgs e) { if (!User.Identity.IsAuthenticated) { Response.Redirect("/Account/Giris"); } //aqyery stringle tipe göre fatura makbuz vb bütün tasarım kayıtları burada yapılacak if (!IsPostBack) { string tip = Request.QueryString["tip"]; string firma = KullaniciIslem.firma(); if (tip.Equals("fatura")) { //fatura yolunu bulalım bool?tek = false; using (Radius.radiusEntities dc = Radius.MyContext.Context(KullaniciIslem.firma())) { AyarCurrent ay = new AyarCurrent(dc); tek = ay.get().cift_taraf; } if (tek == true) { string path = "/Raporlar/" + KullaniciIslem.firma() + "fatura.repx"; string yol = Server.MapPath(path); XtraReport report = new faturaX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else { string path = "/Raporlar/" + KullaniciIslem.firma() + "faturaTek.repx"; string yol = Server.MapPath(path); XtraReport report = new faturaTekX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } } else if (tip.Equals("makbuz")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "makbuz.repx"; string yol = Server.MapPath(path); XtraReport report = new makbuzX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("servis")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "servis.repx"; string yol = Server.MapPath(path); XtraReport report = new baslamaX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("servis_maliyet")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "servis_maliyet.repx"; string yol = Server.MapPath(path); ServisDAL.Raporlama.ServisMaliyetlerX report = new ServisDAL.Raporlama.ServisMaliyetlerX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("extre")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "extre.repx"; string yol = Server.MapPath(path); XtraReport report = new extreX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("gelirgider")) { string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgider.repx"; string yol = Server.MapPath(path); XtraReport report = new GelirGiderX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("gelirgiderozet")) { string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgiderozet.repx"; string yol = Server.MapPath(path); XtraReport report = new GelirGiderOzetX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("gelirgidergruplu")) { string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgidergruplu.repx"; string yol = Server.MapPath(path); XtraReport report = new GelirGiderGrupluX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("gelirgideraylik")) { string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgideraylik.repx"; string yol = Server.MapPath(path); XtraReport report = new GelirGiderAylikX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } else if (tip.Equals("makineanaliz")) { string path = "/Raporlar/" + KullaniciIslem.firma() + "makine.repx"; string yol = Server.MapPath(path); XtraReport report = new makineX(); if (File.Exists(yol)) { report.LoadLayout(yol); } ASPxReportDesigner1.OpenReport(report); } } }
protected void ASPxReportDesigner1_SaveReportLayout(object sender, SaveReportLayoutEventArgs e) { string tip = Request.QueryString["tip"]; string firma = KullaniciIslem.firma(); if (tip.Equals("fatura")) { //fatura yolunu bulalım bool?ciftTaraf = false; using (Radius.radiusEntities dc = Radius.MyContext.Context(KullaniciIslem.firma())) { AyarCurrent ay = new AyarCurrent(dc); ciftTaraf = ay.get().cift_taraf; } if (ciftTaraf == true) { string path = "/Raporlar/" + KullaniciIslem.firma() + "fatura.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); } else { string path = "/Raporlar/" + KullaniciIslem.firma() + "faturaTek.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); } ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("makbuz")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "makbuz.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("servis")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "servis.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("extre")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "extre.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("servis_maliyet")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "servis_maliyet.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("gelirgider")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgider.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("gelirgiderozet")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgiderozet.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("gelirgidergruplu")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgidergruplu.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("gelirgideraylik")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "gelirgideraylik.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } else if (tip.Equals("makineanaliz")) { //fatura yolunu bulalım string path = "/Raporlar/" + KullaniciIslem.firma() + "makine.repx"; string yol = Server.MapPath(path); File.WriteAllBytes(yol, e.ReportLayout); ASPxWebControl.RedirectOnCallback("~/"); } }
protected void Page_Load(object sender, EventArgs e) { //querystringe göre baskı yapılacakların string tip = Request.QueryString["tip"]; if (!String.IsNullOrEmpty(tip)) { if (tip.Equals("tahsilat")) { if (Session["Makbuz_Gorunum"] != null) { Makbuz_Gorunum gor = (Makbuz_Gorunum)Session["Makbuz_Gorunum"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.MakbuzBas(gor, baskiGoster); } } } else if (tip.Equals("emanet")) { if (Session["Makbuz_Gorunum"] != null) { Makbuz_Gorunum gor = (Makbuz_Gorunum)Session["Makbuz_Gorunum"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.EmanetBas(gor, baskiGoster); } } } else if (tip.Equals("baslama")) { if (Session["Servis_Baslama"] != null) { Servis_Baslama gor = (Servis_Baslama)Session["Servis_Baslama"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.BaslamaBas(gor, baskiGoster); } } } else if (tip.Equals("servis_maliyet")) { if (Session["servis_maliyet"] != null) { maliyet liste = (maliyet)Session["servis_maliyet"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.ServisMaliyet(liste, baskiGoster); } } } else if (tip.Equals("manuel")) { if (Session["Fatura_Bilgisi"] != null) { InternetFaturasi gor = (InternetFaturasi)Session["Fatura_Bilgisi"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); AyarCurrent ay = new AyarCurrent(dc); pr.ManuelBas(gor, baskiGoster, ay.get().cift_taraf, KullaniciIslem.firma()); } } } else if (tip.Equals("extre")) { if (Session["extre"] != null) { extre gor = (extre)Session["extre"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.ExtreBas(gor, baskiGoster); } } } else if (tip.Equals("extredonem")) { if (Session["extredonem"] != null) { extre gor = (extre)Session["extredonem"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.ExtreBas(gor, baskiGoster); } } } else if (tip.Equals("gider_raporu")) { if (Session["gider_raporu"] != null) { wrapper gor = (wrapper)Session["gider_raporu"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.GelirGiderBas(gor, KullaniciIslem.firma(), baskiGoster); } } } else if (tip.Equals("tahsilat_raporu")) { if (Session["tahsilat_raporu"] != null) { wrapper gor = (wrapper)Session["tahsilat_raporu"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.GelirGiderBas(gor, KullaniciIslem.firma(), baskiGoster); } } } else if (tip.Equals("satis_raporu")) { if (Session["satis_raporu"] != null) { wrapper gor = (wrapper)Session["satis_raporu"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.GelirGiderBas(gor, KullaniciIslem.firma(), baskiGoster); } } } else if (tip.Equals("odeme_tahsilat")) { if (Session["odeme_tahsilat"] != null) { wrapper_genel gor = (wrapper_genel)Session["odeme_tahsilat"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.GelirGiderGenelBas(gor, baskiGoster); } } } else if (tip.Equals("odeme_tahsilat_gruplu")) { if (Session["odeme_tahsilat_gruplu"] != null) { wrapper_genel_gruplu gor = (wrapper_genel_gruplu)Session["odeme_tahsilat_gruplu"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.GelirGiderGenelGrupluBas(gor, baskiGoster); } } } else if (tip.Equals("odeme_tahsilat_satis")) { if (Session["odeme_tahsilat_satis"] != null) { wrapper_genel_gruplu gor = (wrapper_genel_gruplu)Session["odeme_tahsilat_satis"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.GelirGiderGenelGrupluBas(gor, baskiGoster); } } } else if (tip.Equals("makineanaliz")) { if (Session["makineanaliz"] != null) { string firma = KullaniciIslem.firma(); MakineAnaliz gor = (MakineAnaliz)Session["makineanaliz"]; using (radiusEntities dc = MyContext.Context(firma)) { FaturaPrinter pr = new FaturaPrinter(dc); pr.MakineGenelGrupluBas(gor, baskiGoster, firma); } } } else if (tip.Equals("periyodik_rapor")) { if (Session["periyodik_rapor"] != null) { wrapper_genel_periyodik gor = (wrapper_genel_periyodik)Session["periyodik_rapor"]; using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaPrinter pr = new FaturaPrinter(dc); pr.PeriyodikRaporBas(gor, baskiGoster); } } } } }
protected void btnBelge_Click(object sender, EventArgs e) { string id = txtServisID.Value; int servisid = Int32.Parse(id); //burada servis başlama için bir geçiş sınıfıyla Session'a atıp Baski.aspx'e gönder using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { FaturaBas bas = new FaturaBas(dc); AyarCurrent ay = new AyarCurrent(dc); Servis_Baslama servisBilgisi = bas.ServisBilgileri(txtKimlikNo.Value.Trim(), ay.get()); Session["Servis_Baslama"] = servisBilgisi; } string uri = "/Baski.aspx?tip=baslama"; Response.Redirect(uri); //string kimlikNo = Request.QueryString["kimlik"]; //string url = "/TeknikTeknik/ServisBelgesi.aspx?kimlik=" + kimlikNo; //Response.Redirect(url); }
protected void Button1_Click(object sender, EventArgs e) { kullanici_repo kullanici = KullaniciIslem.currentKullanici(); string kimlik = txtKimlikNo.Value; Servis_Baslama servisBilgisi = null; int musID = Convert.ToInt32(GridView1.SelectedValue); using (radiusEntities dc = MyContext.Context(kullanici.Firma)) { ServisIslemleri servis = new ServisIslemleri(dc); string kullaniciID = kullanici.id; string aciklama = txtServisAciklama.Text; int tipID = Convert.ToInt32(drdTip.SelectedValue); string atananID = "0"; if (User.IsInRole("Admin") || User.IsInRole("mudur")) { atananID = drdKullanici.SelectedValue; } string baslik = txtBaslik.Text; string firma = kullanici.Firma; int id = Convert.ToInt32(GridView1.SelectedValue); DateTime acilma_zamani = DateTime.Now; string zamanS = tarih2.Value; if (!String.IsNullOrEmpty(zamanS)) { acilma_zamani = DateTime.Parse(zamanS); } if (GridView1.SelectedIndex >= 0) { servis.servisEkleGorevliR(musID, kullaniciID, aciklama, tipID, atananID, kimlik, baslik, acilma_zamani, User.Identity.Name); } if (cbYazdir.Checked == true) { FaturaBas bas = new FaturaBas(dc); AyarCurrent ay = new AyarCurrent(dc); servisBilgisi = bas.ServisBilgileri(kimlik, ay.get()); Session["Servis_Baslama"] = servisBilgisi; } } if (cbYazdir.Checked == true && servisBilgisi != null) { string uri = "/Baski.aspx?tip=baslama"; Response.Redirect(uri); } else { Response.Redirect("/TeknikTeknik/Servis2.aspx?kimlik=" + kimlik + "&custid=" + musID); } }