private void GridDoldur()
 {
     try
     {
         using (cUrunGenel UG = new cUrunGenel())
         {
             gvMarkalar.DataSource = UG.ListeleMarka(0);
             gvMarkalar.DataBind();
         }
     }
     catch (Exception ex)
     {
         UIAraclari.cLog.Write(ex, UIAraclari._iKullaniciID);
     }
 }
 protected void gvKargolar_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         using (cUrunGenel UG = new cUrunGenel())
         {
             DataRow dr = UG.ListeleMarka(gvMarkalar.SelectedDataKey["ID"].ToShort(-1)).Rows[0];
             txtMarkaAdi.Text = dr["ADI"].ToString();
             txtAciklama.Text = dr["ACIKLAMA"].ToString();
             txtKodu.Text     = dr["KODU"].ToString();
             lblID.Text       = dr["ID"].ToString();
         }
     }
     catch (Exception ex)
     {
         UIAraclari.cLog.Write(ex, UIAraclari._iKullaniciID);
     }
 }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (UIAraclari._iKullaniciTipi != eKullaniciTipi.Yonetici)
                {
                    Response.Redirect(ResolveUrl("~/Default.aspx"));
                }
                if (!Page.IsPostBack)
                {
                    ddlParaBirimi.DataSource     = cAraclar.VerEnumListesi(typeof(eParaBirimi));
                    ddlParaBirimi.DataValueField = "Key";
                    ddlParaBirimi.DataTextField  = "Value";
                    ddlParaBirimi.DataBind();

                    using (cUrunGenel UG = new cUrunGenel())
                    {
                        ddlKategoriler.DataSource     = UG.ListeleKategori(0, -1, null);
                        ddlKategoriler.DataValueField = "ID";
                        ddlKategoriler.DataTextField  = "ADI";
                        ddlKategoriler.DataBind();

                        ddlMarkalar.DataSource     = UG.ListeleMarka(0);
                        ddlMarkalar.DataTextField  = "ADI";
                        ddlMarkalar.DataValueField = "ID";
                        ddlMarkalar.DataBind();
                    }
                    GridDoldur();
                    dvEkleme.Visible = false;
                }
            }
            catch (Exception ex)
            {
                UIAraclari.cLog.Write(ex, UIAraclari._iKullaniciID);
            }
        }