protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                s += "row data bound-";
                string antenid = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "antenid"));

                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    MusteriIslemleri m            = new MusteriIslemleri(dc);
                    List <anten>     antenler     = m.antenler();
                    DropDownList     ddlCountries = (e.Row.FindControl("ddlAnten") as DropDownList);
                    ddlCountries.AppendDataBoundItems = true;
                    ddlCountries.DataSource           = antenler;
                    ddlCountries.DataTextField        = "anten_adi";
                    ddlCountries.DataValueField       = "anten_id";
                    ddlCountries.DataBind();
                    //string antenadi = (e.Row.FindControl("lblCountry") as Label).Text;

                    if (!String.IsNullOrEmpty(antenid))
                    {
                        ddlCountries.Items.FindByValue(antenid).Selected = true;
                    }
                }
            }
        }
Example #2
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_Init(object sender, EventArgs e)
        {
            //if (!IsPostBack)
            //{
            //s += "sayfa load -";
            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    MusteriIslemleri m = new MusteriIslemleri(dc);
                    //drdAntenler.AppendDataBoundItems = true;
                    drdAntenler.DataSource     = m.antenler();
                    drdAntenler.DataTextField  = "anten_adi";
                    drdAntenler.DataValueField = "anten_id";
                    drdAntenler.DataBind();

                    Goster(dc);
                }
            }
        }