Exemplo n.º 1
0
        protected void BtnOk_Click(object sender, EventArgs e)
        {
            Business.messgae     messgae     = new Business.messgae();
            Business.messgaeData messgaedata = new Business.messgaeData();

            messgaedata.messtit  = messtit.Text;
            messgaedata.messtime = messtime.Text;
            messgaedata.messcon  = messcon.Text;


            if (Request.QueryString["id"] != null)
            {
                messgaedata.Id = Request.QueryString["id"];
                messgae.Modify(messgaedata);
            }
            else
            {
                messgae.Insert(messgaedata);
            }

            Response.Redirect("messgaetb.aspx");

            messgae     = null;
            messgaedata = null;
        }
Exemplo n.º 2
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string Id = e.CommandName;

            Business.messgae messgae = new Business.messgae();
            messgae.Delete(Id);
            Repeater1.DataSource = messgae.Get("");
            Repeater1.DataBind();
            messgae = null;
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Business.messgae messgae = new Business.messgae();
         Repeater1.DataSource = messgae.Get("");
         Repeater1.DataBind();
         messgae = null;
     }
 }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    Business.messgae       messgae     = new Business.messgae();
                    Business.messgaeData[] messgaedata = messgae.Select(Request.QueryString["id"]);

                    messtit.Text  = messgaedata[0].messtit;
                    messtime.Text = messgaedata[0].messtime;
                    messcon.Text  = messgaedata[0].messcon;


                    messgae     = null;
                    messgaedata = null;
                }
            }
        }