Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DropDownListWriter.DataSource     = WriterRepository.GetAllWriters();
         DropDownListWriter.DataTextField  = "WriterName";
         DropDownListWriter.DataValueField = "WriterID";
         DropDownListWriter.DataBind();
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Repeater1.DataSource = WriterRepository.GetAllWriters();
            Repeater1.DataBind();


            if (Request.QueryString["ID"] != null)
            {
                int id = int.Parse(Request.QueryString["ID"]);

                WriterRepository.DeleteWriter(id);

                Response.Redirect("WriterList.aspx");
            }
        }