Esempio n. 1
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();
            }
        }
Esempio n. 2
0
        private void tarifeCek(radiusEntities dc)
        {
            if (grdMakine.SelectedValue != null)
            {
                int         id        = Convert.ToInt32(grdMakine.SelectedValue);
                MakineIslem m         = new MakineIslem(dc);
                var         tarifeler = m.tarifeler(id);
                //if (tarifeler.Count > 0)
                //{
                drdTarife.DataSource     = tarifeler;
                drdTarife.DataValueField = "id";
                drdTarife.DataTextField  = "ad";
                drdTarife.DataBind();
                //}
                Makine mak = m.tekmakine(id);
                txtSonNumara.Text        = mak.son_sayac.ToString();
                txtMakineAdiGoster.Value = mak.adi;

                if (tarifeler.Count > 0)
                {
                    int tarifeid = Convert.ToInt32(drdTarife.SelectedValue);


                    Tarife t = m.tarife_tek(tarifeid);
                    txtFiyat.Text = t.tutar.ToString();

                    if (t.saatlik == true)
                    {
                        numara_aralik.Visible = true;
                        hdnSaatlik.Value      = "yes";
                        tarih_aralik.Visible  = false;
                    }
                    else
                    {
                        numara_aralik.Visible = false;
                        hdnSaatlik.Value      = string.Empty;
                        tarih_aralik.Visible  = true;
                    }
                }
                else
                {
                    txtFiyat.Text    = String.Empty;
                    hdnSaatlik.Value = string.Empty;
                }
            }
        }
Esempio n. 3
0
        private void fiyatCek(radiusEntities dc)
        {
            if (grdMakine.SelectedValue != null && drdTarife.SelectedValue != null)
            {
                int id       = Convert.ToInt32(grdMakine.SelectedValue);
                int tarifeid = Convert.ToInt32(drdTarife.SelectedValue);

                MakineIslem m   = new MakineIslem(dc);
                Makine      mak = m.tekmakine(id);
                Tarife      t   = m.tarife_tek(tarifeid);

                txtFiyat.Text = t.tutar.ToString();

                txtSonNumara.Text        = mak.son_sayac.ToString();
                txtMakineAdiGoster.Value = mak.adi;
            }
        }