コード例 #1
0
        protected void Changed(object sender, EventArgs e)
        {
            DropDownList comboBox = (DropDownList)sender;

            try
            {
                int       kullaniciID = Convert.ToInt32(comboBox.Text.ToString());
                DataTable dt          = veriIslem.dataTable(sqlSorgu.Bilgilendirme(kullaniciID));
                fullNameIade.Text = dt.Rows[0][0].ToString() + " " + dt.Rows[0][1].ToString();
                usernameIade.Text = dt.Rows[0][4].ToString();
            }
            catch (Exception)
            {
                fullNameIade.Text = "";
                usernameIade.Text = "";
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string kullaniciID = Request.QueryString["kullaniciID"];

            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(kullaniciID))
                {
                    search.Visible   = false;
                    add.Visible      = true;
                    list.Visible     = false;
                    delButon.Visible = false;
                    DataTable dt = veriIslem.dataTable(sqlSorgu.Bilgilendirme(Convert.ToInt32(kullaniciID)));
                    txtAd.Text    = dt.Rows[0][0].ToString();
                    txtSoyad.Text = dt.Rows[0][1].ToString();
                    txtNo.Text    = dt.Rows[0][2].ToString();
                    txtAdres.Text = dt.Rows[0][3].ToString();
                }
                else if (Session["duzenlenenKullanici"] == null)
                {
                    DataTable dt = veriIslem.dataTable(sqlSorgu.kullaniciListe());
                    gridKullanici.DataSource = dt;
                    gridKullanici.Width      = 800;
                    gridKullanici.DataBind();
                }
                else
                {
                    list.Visible     = false;
                    delButon.Visible = false;
                    search.Visible   = false;
                    add.Visible      = true;
                    string ID = null;
                    ID = Session["duzenlenenKullanici"].ToString();
                    if (ID != null)
                    {
                        DataTable dt = veriIslem.dataTable(sqlSorgu.Bilgilendirme(Convert.ToInt32(ID)));
                        txtAd.Text    = dt.Rows[0][0].ToString();
                        txtSoyad.Text = dt.Rows[0][1].ToString();
                        txtNo.Text    = dt.Rows[0][2].ToString();
                        txtAdres.Text = dt.Rows[0][3].ToString();
                    }
                }
            }
        }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["userID"] != null)
     {
         int       kullaniciID = Convert.ToInt32(Session["userID"].ToString());
         DataTable dt          = veriIslem.dataTable(sqlSorgu.Bilgilendirme(kullaniciID));
         txtname.Text        = dt.Rows[0][0].ToString() + " " + dt.Rows[0][1].ToString();
         txtphoneNo.Text     = dt.Rows[0][2].ToString();
         txtaddress.Text     = dt.Rows[0][3].ToString();
         txtKullaniciId.Text = kullaniciID.ToString();
     }
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["userID"] != null) //Güncellenecek olan kişinin bilgileri textbox'a aktarılır. İstenilen veri daha sonra değiştirilir
         {
             DataTable dt = veriIslem.dataTable(sqlSorgu.Bilgilendirme(Convert.ToInt32(Session["userID"].ToString())));
             txtAd.Text    = dt.Rows[0][0].ToString();
             txtSoyad.Text = dt.Rows[0][1].ToString();
             txtNo.Text    = dt.Rows[0][2].ToString();
             txtAdres.Text = dt.Rows[0][3].ToString();
         }
     }
 }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e) //Yetkiliye ait bilgilerin listelendiği sayfa
        {
            SQLSorgu  sqlSorgu  = new SQLSorgu();
            VeriIslem veriIslem = new VeriIslem();

            if (Session["userID"] != null)
            {
                int       kullaniciID = Convert.ToInt32(Session["userID"].ToString());
                DataTable dt          = veriIslem.dataTable(sqlSorgu.Bilgilendirme(kullaniciID));
                txtname.Text    = dt.Rows[0][0].ToString() + " " + dt.Rows[0][1].ToString();
                txtphoneNo.Text = dt.Rows[0][2].ToString();
                txtaddress.Text = dt.Rows[0][3].ToString();
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string kitapID      = Request.QueryString["kitapID"];
            string kullaniciID  = Request.QueryString["kullaniciID"];
            string kitapID2     = Request.QueryString["kitapID2"];
            string kullaniciID2 = Request.QueryString["kullaniciID2"];

            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(kitapID))
                {
                    Session["kitapID"] = kitapID;
                    Response.Redirect("Kiralama.aspx");
                }
                else if (!String.IsNullOrEmpty(kullaniciID))
                {
                    Session["duzenlenenKullanici"] = kullaniciID;
                    Response.Redirect("KullaniciDuzenle.aspx");
                }
                else if (!String.IsNullOrEmpty(kitapID2) && !string.IsNullOrEmpty(kullaniciID2))
                {
                    int       IDK         = Convert.ToInt32(kullaniciID2);
                    int       ID          = Convert.ToInt32(kitapID2);
                    int       kitapSayisi = Convert.ToInt32(veriIslem.dataTable(sqlSorgu.getKitapSayisi(ID)).Rows[0][0].ToString()) + 1;
                    DataTable dtKira      = veriIslem.dataTable(sqlSorgu.KitapIadeInfo(ID, IDK));
                    veriIslem.dataTable(sqlSorgu.KitapSayiGuncelle(kitapSayisi, ID));
                    veriIslem.dataTable(sqlSorgu.KitapIadeKira(ID, IDK));
                    liste.Visible    = false;
                    mainPage.Visible = false;
                    iade.Visible     = true;
                    lblIade.Text     = veriIslem.dataTable(sqlSorgu.Bilgilendirme(IDK)).Rows[0][0].ToString() + " " + veriIslem.dataTable(sqlSorgu.Bilgilendirme(IDK)).Rows[0][1].ToString() + " adlı kullanıcı "
                                       + veriIslem.dataTable(sqlSorgu.KitapSorguID(ID)).Rows[0][1].ToString() + " kitabını iade etmiştir.";
                }
            }

            DataTable dt = veriIslem.dataTable(sqlSorgu.Kiralama());

            gridKitaplar.DataSource = dt;
            gridKitaplar.Width      = 800;
            gridKitaplar.DataBind();
        }