protected void btnRapor_Click(object sender, EventArgs e) { string tip = Request.QueryString["tip"]; if (!string.IsNullOrEmpty(tip)) { string firma = KullaniciIslem.firma(); using (radiusEntities dc = MyContext.Context(firma)) { AyarCurrent ay = new AyarCurrent(dc); if (ay.lisansKontrol() == false) { Response.Redirect("/LisansError"); } GelirGider g = new ServisDAL.GelirGider(dc); string basS = datetimepicker6.Value; string sonS = datetimepicker7.Value; var son = DateTime.Now; var bas = new DateTime(son.Year, son.Month, 1); if (!String.IsNullOrEmpty(basS)) { bas = DateTime.Parse(basS); } if (!String.IsNullOrEmpty(sonS)) { son = DateTime.Parse(sonS); } g.baslangic = bas; g.son = son; if (tip.Equals("odeme_tahsilat")) { wrapper_genel wg = g.gonder_genel("odeme_tahsilat"); wg.firma = firma; Session["odeme_tahsilat"] = wg; Response.Redirect("/Baski.aspx?tip=odeme_tahsilat"); } else if (tip.Equals("gider_raporu")) { wrapper wr = g.gonder("odeme"); wr.firma = firma; Session["gider_raporu"] = wr; Response.Redirect("/Baski.aspx?tip=gider_raporu"); } else if (tip.Equals("tahsilat_raporu")) { wrapper wr = g.gonder("tahsilat"); wr.firma = firma; Session["tahsilat_raporu"] = wr; Response.Redirect("/Baski.aspx?tip=tahsilat_raporu"); } else if (tip.Equals("satis_raporu")) { wrapper wr = g.gonder("satis"); wr.firma = firma; Session["satis_raporu"] = wr; Response.Redirect("/Baski.aspx?tip=satis_raporu"); } else if (tip.Equals("odeme_tahsilat_gruplu")) { wrapper_genel_gruplu wg = g.gonder_gruplu("odeme_tahsilat_gruplu"); wg.firma = firma; wg.tip = "TÜRLERİNE GÖRE ÖDEME VE TAHSİLATLAR"; Session["odeme_tahsilat_gruplu"] = wg; Response.Redirect("/Baski.aspx?tip=odeme_tahsilat_gruplu"); } else if (tip.Equals("odeme_tahsilat_satis")) { wrapper_genel_gruplu wg = g.gonder_gruplu_satisli("odeme_tahsilat_satis"); wg.firma = firma; wg.tip = "TÜRLERİNE GÖRE ÖDEME/TAHSİLAT/SATIŞ"; Session["odeme_tahsilat_satis"] = wg; Response.Redirect("/Baski.aspx?tip=odeme_tahsilat_satis"); } else if (tip.Equals("periyodik_rapor")) { int per = 7; string prS = txtPeriyot.Text; if (!String.IsNullOrEmpty(prS)) { per = Int32.Parse(prS); } wrapper_genel_periyodik wg = g.periyodik_rapor(per, bas, son); wg.firma = firma; Session["periyodik_rapor"] = wg; Response.Redirect("/Baski.aspx?tip=periyodik_rapor"); } } } }
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); } } } } }