Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }
            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    ServisIslemleri s = new ServisIslemleri(dc);
                    cihazGoster(s);

                    drdPaketler.AppendDataBoundItems = true;

                    drdPaketler.DataSource     = s.servis_paketleri();
                    drdPaketler.DataValueField = "paket_id";
                    drdPaketler.DataTextField  = "paket_adi";
                    drdPaketler.DataBind();
                    txtGarantiSuresi.Text = "24";
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated || (!User.IsInRole("Admin") && !User.IsInRole("mudur")))
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }
            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    CihazAraa(dc);

                    string s = txtAra.Value;

                    if (!String.IsNullOrEmpty(s) && !String.IsNullOrWhiteSpace(s))
                    {
                        MusteriIslemleri m = new MusteriIslemleri(dc);

                        GridView1.DataSource = m.musteriAraR2(s, "tedarikci");
                        GridView1.DataBind();
                    }
                }

                // detaylara bakalım
                DetayGoster();
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            string firma = KullaniciIslem.firma();
            using (radiusEntities dc=MyContext.Context(firma))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    musteriGoster(dc);
                    if (GridView3.SelectedValue != null)
                    {
                        int id = Convert.ToInt32(GridView3.SelectedValue);

                        UrunAra(dc, id);
                    }
                }
            
            }
          
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }
            string custidd = Request.QueryString["custid"];

            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(custidd))
                {
                    int    custid   = Int32.Parse(custidd);
                    string aciklama = txtAciklama.Text;

                    using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                    {
                        AyarCurrent ay = new AyarCurrent(dc);
                        if (ay.lisansKontrol() == false)
                        {
                            Response.Redirect("/LisansError");
                        }
                        MusteriIslemleri m    = new MusteriIslemleri(dc);
                        Radius.customer  must = m.musteriTekR(custid);
                        musteri.InnerHtml        = must.Ad;
                        musteriEkBilgi.InnerHtml = must.telefon;
                    }

                    tarih.InnerHtml = DateTime.Now.ToString("D");
                }
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            s += "sayfa load postback-";
            string antenid = Request.QueryString["antenid"];

            if (!String.IsNullOrEmpty(antenid))
            {
                btnHepsiniTasi.Visible = true;
            }
            else
            {
                btnHepsiniTasi.Visible = false;
            }

            if (IsPostBack)
            {
                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }

                    Kaydet(dc);
                }
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated || (!User.IsInRole("Admin") && !User.IsInRole("mudur")))
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }
            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }

                    MasrafAraa(dc);
                    MakineIslem m         = new MakineIslem(dc);
                    string      makine_id = Request.QueryString["makineid"];
                    if (!String.IsNullOrEmpty(makine_id))
                    {
                        int makineid = Int32.Parse(makine_id);
                        var mak      = m.tekmakine(makineid);
                        baslik.InnerHtml = mak.adi + "-" + mak.plaka;
                    }
                }

                // detaylara bakalım
                DetayGoster();
            }
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            barkod.Focus();
            this.Master.servisarama = true;
            this.Master.kisiarama   = true;

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }


                    MusteriIslemleri m  = new MusteriIslemleri(dc);
                    pos_banka_look   pb = m.posbankalar();

                    drdPos.AppendDataBoundItems = true;
                    drdPos.DataSource           = pb.poslar;
                    drdPos.DataValueField       = "pos_id";
                    drdPos.DataTextField        = "pos_adi";
                }
                CihazAraa(dc);
                // detaylara bakalım
                DetayGoster();
            }
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            kullanici_repo kullanici = KullaniciIslem.currentKullanici();

            string firma = kullanici.Firma;

            using (radiusEntities dc = MyContext.Context(firma))
            {
                AyarCurrent ay = new AyarCurrent(dc);
                if (ay.lisansKontrol() == false)
                {
                    Response.Redirect("/LisansError");
                }
                AyarIslemleri ayarimiz = new AyarIslemleri(dc);
                if (!IsPostBack)
                {
                    gosterHepsi(kullanici, dc);
                }
            }
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    AyarIslemleri servis = new AyarIslemleri(dc);
                    List <Radius.service_tips> tipler = servis.tipListesiR();
                    if (tipler != null)
                    {
                        drdTip.AppendDataBoundItems = true;
                        drdTip.DataSource           = tipler;
                        drdTip.DataValueField       = "tip_id";
                        drdTip.DataTextField        = "tip_ad";
                        drdTip.DataBind();
                    }



                    txtKimlikNo.Value = AletEdavat.KimlikUret(10);
                }
                if (User.IsInRole("Admin") || User.IsInRole("mudur"))
                {
                    kullaniciSecim.Visible = true;
                    if (!IsPostBack)
                    {
                        drdKullanici.AppendDataBoundItems = true;

                        drdKullanici.DataSource     = KullaniciIslem.firmaKullanicilari();
                        drdKullanici.DataValueField = "id";
                        drdKullanici.DataTextField  = "userName";
                        drdKullanici.DataBind();
                    }
                }

                string s = txtAra.Value;

                if (!String.IsNullOrEmpty(s))
                {
                    MusteriIslemleri m = new MusteriIslemleri(dc);

                    GridView1.DataSource = m.musteriAraR2(s, "musteri");

                    GridView1.SelectedIndex = 0;
                    GridView1.DataBind();
                }
            }
        }
Ejemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!User.Identity.IsAuthenticated)
     {
         System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
     }
     using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
     {
         AyarCurrent ay = new AyarCurrent(dc);
         if (ay.lisansKontrol() == false)
         {
             Response.Redirect("/LisansError");
         }
         goster(dc);
     }
 }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    Ara(dc);
                }
            }
        }
Ejemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!User.Identity.IsAuthenticated || (!User.IsInRole("Admin") && !User.IsInRole("mudur")))
     {
         System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
     }
     using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
     {
         if (!IsPostBack)
         {
             AyarCurrent ay = new AyarCurrent(dc);
             if (ay.lisansKontrol() == false)
             {
                 Response.Redirect("/LisansError");
             }
             Ara(dc);
         }
     }
 }
Ejemplo n.º 13
0
        private void Ara()
        {
            DateTime baslangic = DateTime.Now.AddMonths(-3);

            if (!String.IsNullOrEmpty(datetimepicker6.Value))
            {
                baslangic = DateTime.Parse(datetimepicker6.Value);
            }
            DateTime bitis = DateTime.Now;

            if (!String.IsNullOrEmpty(datetimepicker7.Value))
            {
                bitis = DateTime.Parse(datetimepicker7.Value);
            }

            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                AyarCurrent ay = new AyarCurrent(dc);
                if (ay.lisansKontrol() == false)
                {
                    Response.Redirect("/LisansError");
                }
                SatinAlim s = new SatinAlim(dc);

                string cust_id   = Request.QueryString["custid"];
                string cihaz_id  = Request.QueryString["cihazid"];
                string alim_id   = Request.QueryString["alimid"];
                string masraf_id = Request.QueryString["masrafid"];
                if (!string.IsNullOrEmpty(cust_id))
                {
                    btnMusteriDetayim.Visible = true;
                }
                DetayOzet ozet = s.Detaylar(baslangic, bitis, cust_id, cihaz_id, alim_id, masraf_id);
                txtIslemAdet.InnerHtml  = "İşlem :" + ozet.islem_adet.ToString();
                txtToplamAdet.InnerHtml = "Miktar :" + ozet.toplam_adet.ToString();

                txtYekun.InnerHtml    = "Yekün :" + ozet.yekun.ToString("C");
                grdAlimlar.DataSource = ozet.detaylar;
                grdAlimlar.DataBind();
            }
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }
            //this.Master.kisiarama = false;
            //this.Master.servisarama = false;
            //string firma = KullaniciIslem.firma();
            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);

                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    List <anten> antenler = m.antenler();
                    if (antenler != null)
                    {
                        drdAnten.AppendDataBoundItems = true;
                        drdAnten.DataSource           = antenler;
                        drdAnten.DataValueField       = "anten_id";
                        drdAnten.DataTextField        = "anten_adi";

                        drdAnten.DataBind();

                        drdAntenDuzen.AppendDataBoundItems = true;
                        drdAntenDuzen.DataSource           = antenler;
                        drdAntenDuzen.DataValueField       = "anten_id";
                        drdAntenDuzen.DataTextField        = "anten_adi";
                        drdAntenDuzen.DataBind();
                    }
                    toplu(m);
                }

                //gosterHepsiSession(m);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!User.Identity.IsAuthenticated)
     {
         System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
     }
     if (!IsPostBack) //check if the webpage is loaded for the first time.
     {
         ViewState["PreviousPage"] =
             Request.UrlReferrer;//Saves the Previous page url in ViewState
     }
     using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
     {
         AyarCurrent ay = new AyarCurrent(dc);
         if (ay.lisansKontrol() == false)
         {
             Response.Redirect("/LisansError");
         }
     }
 }
Ejemplo n.º 16
0
        public void MusteriAra(object sender, EventArgs e)
        {
            string s = txtAra.Value;

            if (!String.IsNullOrEmpty(s))
            {
                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    MusteriIslemleri m = new MusteriIslemleri(dc);

                    GridView1.DataSource = m.musteriAraR2(s, "musteri");
                    GridView1.DataBind();
                }
            }
        }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }
            this.Master.servisarama = false;
            this.Master.kisiarama   = false;
            kullanici_repo kullanici = KullaniciIslem.currentKullanici();

            string firma = kullanici.Firma;

            using (radiusEntities dc = MyContext.Context(firma))
            {
                AyarCurrent ay = new AyarCurrent(dc);
                if (ay.lisansKontrol() == false)
                {
                    Response.Redirect("/LisansError");
                }
                AyarIslemleri ayarimiz = new AyarIslemleri(dc);
                if (!IsPostBack)
                {
                    List <Radius.service_tips> tipler = ayarimiz.tipListesiR();
                    drdTip.AppendDataBoundItems = true;
                    drdTip.DataSource           = ayarimiz.tipListesiR();
                    drdTip.DataValueField       = "tip_id";
                    drdTip.DataTextField        = "tip_ad";
                    drdTip.DataBind();


                    drdTipSec.AppendDataBoundItems = true;
                    drdTipSec.DataSource           = ayarimiz.tipListesiR();
                    drdTipSec.DataValueField       = "tip_id";
                    drdTipSec.DataTextField        = "tip_ad";
                    drdTipSec.DataBind();

                    gosterHepsi(kullanici, dc);
                }
            }
        }
Ejemplo n.º 18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!User.Identity.IsAuthenticated)
     {
         System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
     }
     using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
     {
         if (!IsPostBack)
         {
             AyarCurrent ay = new AyarCurrent(dc);
             if (ay.lisansKontrol() == false)
             {
                 Response.Redirect("/LisansError");
             }
             ServisIslemleri s = new ServisIslemleri(dc);
             cihazGoster(s);
             birimler(dc);
             txtGarantiSuresi.Text = "24";
         }
     }
 }
Ejemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }
            //this.Master.kisiarama = false;
            //string firma = KullaniciIslem.firma();
            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);

                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    toplu(m);
                }
            }
        }
Ejemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    //if (ay.calismaTipli() == true)
                    //{
                    tarife_listesi(dc);
                    //drdTarifeTanim.Visible = true;
                    //}
                    //else
                    //{
                    //    drdTarifeTanim.Visible = false;
                    //}


                    ortak(dc, "", "");
                    grdOperator.DataSource = KullaniciIslem.FirmaOperatorleri();
                    grdOperator.DataBind();
                }
            }
            if (!User.IsInRole("Admin") && !User.IsInRole("mudur"))
            {
                txtHesapMaliyet.Visible = false;
            }
        }
Ejemplo n.º 21
0
        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");
                    }
                }
            }
        }
Ejemplo n.º 22
0
        private void Ara()
        {
            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                AyarCurrent ay = new AyarCurrent(dc);
                if (ay.lisansKontrol() == false)
                {
                    Response.Redirect("/LisansError");
                }
                TekRapor r = new TekRapor(dc);
                r.baslama_tarihi = datetimepicker6.Value.Trim();
                r.bitis_tarihi   = datetimepicker7.Value.Trim();
                gunlukrapor gunluk = r.gunluk();
                kasalbl.Text            = "Kasa: " + gunluk.kasabakiye.ToString("C");
                bankalbl.Text           = "Banka: " + gunluk.bankabakiye.ToString("C");
                poslbl.Text             = "Pos: " + gunluk.posbakiye.ToString("C");
                kartlbl.Text            = "Kartlar: " + gunluk.kartbakiye.ToString("C");
                cariborclbl.Text        = "CariBorç: " + gunluk.cariborc.ToString("C");
                carialacaklbl.Text      = "CariAlacak: " + gunluk.carialacak.ToString("C");
                caribakiyelbl.Text      = "CariBakiye: " + gunluk.caribakiye.ToString("C");
                acilanservissayisi.Text = "Açılan Servis: " + gunluk.acilan_servis_sayisi.ToString() + " Adet";
                if (gunluk.acilan_servis_sayisi > 0)
                {
                    acilanPanel.Visible        = true;
                    grdAcilanServis.DataSource = gunluk.acilan_servisler;
                }
                else
                {
                    acilanPanel.Visible = false;
                }
                kapananservissayisi.Text = "Kapanan Servis: " + gunluk.kapanan_servis_sayisi.ToString() + " Adet";
                if (gunluk.kapanan_servis_sayisi > 0)
                {
                    kapananPanel.Visible        = true;
                    grdKapananServis.DataSource = gunluk.kapanan_servisler;
                }
                else
                {
                    kapananPanel.Visible = false;
                }
                kapananservistutari.Text   = "Kapanan Tutar: " + gunluk.kapanan_servis_tutari.ToString("C");
                kapananservismaliyeti.Text = "Kapanan Maliyet: " + gunluk.kapanan_servis_maliyeti.ToString("C");
                acilandisservissayisi.Text = "Yeni Dış: " + gunluk.acilan_dis_servis_sayisi.ToString() + " Adet";
                if (gunluk.acilan_dis_servis_sayisi > 0)
                {
                    yeniDisPanel.Visible    = true;
                    grdDisAcilan.DataSource = gunluk.acilan_dis_servisler;
                }
                else
                {
                    yeniDisPanel.Visible = false;
                }

                acilandisservisMaliyeti.Text   = "Yeni Dış Maliyeti: " + gunluk.acilan_dis_servis_maliyeti.ToString("C");
                tamamlanandisservisSayisi.Text = "Tamamlanan Dış: " + gunluk.tamamlanan_dis_servis_sayisi.ToString() + " Adet";
                if (gunluk.tamamlanan_dis_servis_sayisi > 0)
                {
                    tamamDisPanel.Visible  = true;
                    grdDisTamam.DataSource = gunluk.tamamlanan_dis_servisler;
                }
                else
                {
                    tamamDisPanel.Visible = false;
                }

                tamamlanandisservisMaliyeti.Text = "Tamamlanan Dış Maliyeti: " + gunluk.tamamlanan_dis_servis_maliyeti.ToString("C");
                odemesayisi.Text     = "Ödeme Sayısı: " + gunluk.odemeler_sayisi.ToString() + " Adet";
                odemetoplami.Text    = "Ödemeler: " + gunluk.odemeler_toplami.ToString("C");
                tahsilatsayisi.Text  = "Tahsilat Sayısı: " + gunluk.tahsilat_sayisi.ToString() + " Adet";
                tahsilattoplami.Text = "Tahsilatlar: " + gunluk.tahsilat_toplami.ToString("C");
                if (gunluk.odemeler_sayisi > 0 || gunluk.tahsilat_sayisi > 0)
                {
                    grdOdeme.DataSource = gunluk.odeme_tahsilatlar;
                    odemePanel.Visible  = true;
                }
                else
                {
                    odemePanel.Visible = false;
                }
                satinalmasayisi.Text = "Satın Alma: " + gunluk.satinalma_sayisi.ToString() + " Adet";
                if (gunluk.satinalma_sayisi > 0)
                {
                    grdAlimlar.DataSource = gunluk.satinalimlar;
                    alimPanel.Visible     = true;
                }
                else
                {
                    alimPanel.Visible = false;
                }

                if (gunluk.emanettekiler_toplami > 0)
                {
                    grdEmanetYeni.DataSource   = gunluk.emanettekiler;
                    emanetVerilenPanel.Visible = true;
                }
                else
                {
                    emanetVerilenPanel.Visible = false;
                }
                if (gunluk.emanetten_donenler_toplami > 0)
                {
                    grdEmanetDonen.DataSource = gunluk.emanet_donenler;
                    emanetDonenPanel.Visible  = true;
                }
                else
                {
                    emanetDonenPanel.Visible = false;
                }

                satinalmaToplami.Text        = "Satın Alma: " + gunluk.satinalma_toplami.ToString("C");
                iadeSayisi.Text              = "İade: " + gunluk.iade_sayisi.ToString() + " Adet";
                iadeTutari.Text              = "İade: " + gunluk.iade_toplami.ToString("C");
                pesinsatisSayisi.Text        = "Peşin Satış: " + gunluk.pesin_satis_sayisi.ToString() + " Adet";
                pesinSatisTutari.Text        = "Peşin Satış: " + gunluk.pesin_satis_toplami.ToString("C");
                emanetVerilenSayisi.Text     = "Verilen Emanet: " + gunluk.emanettekiler_toplami.ToString() + " Adet";
                emanettenDonenlerSayisi.Text = "Dönen Emanet: " + gunluk.emanetten_donenler_toplami.ToString() + " Adet";

                DataBind();
            }
        }
Ejemplo n.º 23
0
        private void GosterSayfaliView(int no)
        {
            string basS = datetimepicker6.Value;

            string kritik = drdKritik.SelectedValue;

            string tarmirci = Request.QueryString["tamirci"];

            DateTime?bas = null;

            if (!String.IsNullOrEmpty(basS))
            {
                bas = DateTime.Parse(basS);
            }
            bool kapanma = false;

            if (kritik.Equals("acik"))
            {
                kapanma = false;
            }
            else if (kritik.Equals("tamam"))
            {
                kapanma = true;
            }
            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                AyarCurrent ay = new AyarCurrent(dc);
                if (ay.lisansKontrol() == false)
                {
                    Response.Redirect("/LisansError");
                }
                ServisIslemleri s = new ServisIslemleri(dc);
                //List<ServisDAL.Repo.ServisRepo> liste = s.servisTamirci(id, kapanma, bas);
                int perpage = 2;
                if (!string.IsNullOrEmpty(txtSayfalama.Text))
                {
                    perpage = Int32.Parse(txtSayfalama.Text);
                }
                sayfali sayfa = new sayfali();
                if (!String.IsNullOrEmpty(tarmirci))
                {
                    int id = Int32.Parse(tarmirci);
                    sayfa = s.servisTamirciSayfali(id, kapanma, no, perpage, bas);
                }
                else
                {
                    sayfa = s.servisSayfali(kapanma, no, perpage, bas);
                }

                List <ServisDAL.Repo.ServisRepo> liste = sayfa.servis_listesi;
                int kayit_sayisi = sayfa.kayit_sayisi;

                //double sayfa_sayisi = 1.5;
                double sayfa_sayisi = (double)kayit_sayisi / (double)perpage;
                //double nok = (double)no;
                if (no < sayfa_sayisi)
                {
                    btnIleri.Visible = true;
                }
                else
                {
                    btnIleri.Visible = false;
                }
                if (no <= 1)
                {
                    btnGeri.Visible = false;
                }
                else
                {
                    btnGeri.Visible = true;
                }

                //view_.Text = "sayfa sayısı: " + sayfa_sayisi.ToString() + " no: " + no.ToString() +" kayıt: "+kayit_sayisi.ToString();
                int     adet    = liste.Count;
                decimal maliyet = 0;
                decimal yekun   = 0;
                decimal fark    = 0;
                if (adet > 0)
                {
                    maliyet = liste.Sum(x => x.maliyet);
                    yekun   = liste.Sum(x => x.yekun);
                    fark    = yekun - maliyet;
                }
                txtHesapAdet.InnerHtml    = "Adet:" + adet.ToString();
                txtHesapFark.InnerHtml    = "Fark: " + fark.ToString("C");
                txtHesapMaliyet.InnerHtml = "Maliyet: " + maliyet.ToString("C");
                txtHesapYekun.InnerHtml   = "Tutar: " + yekun.ToString("C");
                Repeater1.DataSource      = liste;
                Repeater1.DataBind();
            }
        }