protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Page.IsPostBack)
         {
             using (cSiparisIslemleri SI = new cSiparisIslemleri())
             {
                 DataTable dt = SI.ListeleSiparis(0, 0, null, Request["GUID"].ToString());
                 if (dt.Rows.Count == 1)
                 {
                     ltSiparis.Text  = "Adı :" + dt.Rows[0]["FATURA_ADI"].ToString() + "<br>";
                     ltSiparis.Text += "Adres :" + dt.Rows[0]["ADRES"].ToString() + "<br>";
                     ltSiparis.Text += "Durumu :" + (cAraclar.GetDescription((eSiparisDurumu)dt.Rows[0]["SIPARISDURUMU"].ToShort())) + "<br>";
                     ltSiparis.Text += "Kargo Adı :" + dt.Rows[0]["KARGO_ADI"].ToString() + "<br>";
                     ltSiparis.Text += "Kargo Kodu :" + dt.Rows[0]["KARGOKODU"].ToString() + "<br>";
                     ltSiparis.Text += "Tutar :" + dt.Rows[0]["TUTAR"].ToString() + "<br>";
                     gvSiparisDetaylar.DataSource = SI.ListeleSiparisDetay(0, dt.Rows[0]["ID"].ToLong(), 0);
                     gvSiparisDetaylar.DataBind();
                 }
                 else
                 {
                     UIAraclari.toastMesaj(this, eStatusType.Uyari, "Siparişiniz Bulunamadı");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         UIAraclari.cLog.Write(ex, UIAraclari._iKullaniciID);
     }
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (UIAraclari._iKullaniciTipi != eKullaniciTipi.Yonetici)
                {
                    Response.Redirect(ResolveUrl("~/Default.aspx"));
                }
                if (!Page.IsPostBack)
                {
                    using (cTahsilat TI = new cTahsilat())
                        using (cGenelIslemler GI = new cGenelIslemler())
                            using (cSiparisIslemleri SI = new cSiparisIslemleri())
                            {
                                ddlBanka.DataSource     = TI.ListeleBanka(0, null);
                                ddlBanka.DataTextField  = "BANKA_ADI";
                                ddlBanka.DataValueField = "ID";
                                ddlBanka.DataBind();
                                ddlBanka.Items.Insert(0, new ListItem("Banka Seçilmemiş", "0"));

                                ddlKargo.DataSource     = GI.ListeleKargo(0, null);
                                ddlKargo.DataTextField  = "ADI";
                                ddlKargo.DataValueField = "ID";
                                ddlKargo.DataBind();
                                ddlKargo.Items.Insert(0, new ListItem("Kargo Seçilmemiş", "0"));

                                ddlOdemeTipi.DataSource     = cAraclar.VerEnumListesi(typeof(eOdemeTipi));
                                ddlOdemeTipi.DataTextField  = "Value";
                                ddlOdemeTipi.DataValueField = "Key";
                                ddlOdemeTipi.DataBind();

                                ddlSiparisDurumu.DataSource     = cAraclar.VerEnumListesi(typeof(eSiparisDurumu));
                                ddlSiparisDurumu.DataTextField  = "Value";
                                ddlSiparisDurumu.DataValueField = "Key";
                                ddlSiparisDurumu.DataBind();

                                DataRow dr = SI.ListeleSiparis(Request["ID"].ToLong(0), 0, null, string.Empty).Rows[0];
                                lblUye.Text                    = dr["UYE_ADISOYADI"].ToString();
                                txtFAdi.Text                   = dr["FATURA_ADI"].ToString();
                                txtFVergiNo.Text               = dr["FATURA_VERGINO"].ToString();
                                txtAdres.Text                  = dr["ADRES"].ToString();
                                txtSonuc.Text                  = dr["SPOSSONUC"].ToString();
                                txtKargoKodu.Text              = dr["KARGOKODU"].ToString();
                                ddlBanka.SelectedValue         = dr["BANKAID"].ToInt(0).ToString();
                                ddlKargo.SelectedValue         = dr["KARGOID"].ToInt(0).ToString();
                                ddlOdemeTipi.SelectedValue     = dr["ODEMETIPI"].ToString();
                                ddlSiparisDurumu.SelectedValue = dr["SIPARISDURUMU"].ToString();
                                gvSiparisDetaylar.DataSource   = SI.ListeleSiparisDetay(0, Request["ID"].ToLong(0), 0);
                                gvSiparisDetaylar.DataBind();
                            }
                }
            }
            catch (Exception ex)
            {
                UIAraclari.cLog.Write(ex, UIAraclari._iKullaniciID);
            }
        }
 protected void gvSiparisler_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         using (cSiparisIslemleri SP = new cSiparisIslemleri())
         {
             DataTable dt = SP.ListeleSiparis(gvSiparisler.SelectedDataKey["ID"].ToLong(-1), 0, null, string.Empty);
             ltSiparis.Text  = "Adı :" + dt.Rows[0]["FATURA_ADI"].ToString() + "<br>";
             ltSiparis.Text += "Adres :" + dt.Rows[0]["ADRES"].ToString() + "<br>";
             ltSiparis.Text += "Durumu :" + (cAraclar.GetDescription((eSiparisDurumu)dt.Rows[0]["SIPARISDURUMU"].ToShort())) + "<br>";
             ltSiparis.Text += "Kargo Adı :" + dt.Rows[0]["KARGO_ADI"].ToString() + "<br>";
             ltSiparis.Text += "Kargo Kodu :" + dt.Rows[0]["KARGOKODU"].ToString() + "<br>";
             ltSiparis.Text += "Tutar :" + dt.Rows[0]["TUTAR"].ToString() + "<br>";
             gvSiparisDetaylar.DataSource = SP.ListeleSiparisDetay(0, gvSiparisler.SelectedDataKey["ID"].ToLong(-1), 0);
             gvSiparisDetaylar.DataBind();
         }
     }
     catch (Exception ex)
     {
         cUIAraclari.cLog.Write(ex, cUIAraclari._iKullaniciID);
     }
 }