Exemplo n.º 1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            headerFoundItem           = "Message Found Item";
            InputOutputMessage.Output = new List <string>();
            InputOutputMessage.Output.Add(txtbx_fadress.Text);
            InputOutputMessage.Output.Add(txtbx_ftype.Text);
            InputOutputMessage.Output.Add(txtbx_fbreed.Text);
            InputOutputMessage.Output.Add(txtbx_fcolor.Text);
            InputOutputMessage.Output.Add(txtbx_fdate.Text);
            InputOutputMessage.Output.Add(txtbx_fsize.Text);
            InputOutputMessage.Output.Add(txtbx_fdescr.Text);
            InputOutputMessage.Output.Add(txtbx_fname.Text);

            var message = new InputOutputMessage()
            {
                messageType = MessageType.Found,
                Name        = txtbx_fname.Text,
                Color       = txtbx_fcolor.Text,
                Adress      = txtbx_fadress.Text,
                Type        = txtbx_ftype.Text,
                Size        = txtbx_fsize.Text,
                Breed       = txtbx_fbreed.Text,
                Description = txtbx_fdescr.Text
            };

            InputOutputMessage.AddMessage(message);
        }
Exemplo n.º 2
0
        protected void ButtonAdd_Click(object sender, EventArgs e)
        {
            headerLostItem           = "Message Lost Item";
            InputOutputMessage.Input = new List <string>();
            InputOutputMessage.Input.Add(txtbx_adress.Text);
            InputOutputMessage.Input.Add(txtbx_type.Text);
            InputOutputMessage.Input.Add(txtbx_breed.Text);
            InputOutputMessage.Input.Add(txtbx_color.Text);
            InputOutputMessage.Input.Add(txtbx_date.Text);
            InputOutputMessage.Input.Add(txtbx_size.Text);
            InputOutputMessage.Input.Add(txtbx_descript.Text);
            InputOutputMessage.Input.Add(txtbx_name.Text);

            var message = new InputOutputMessage()
            {
                messageType = MessageType.Lost,
                Name        = txtbx_name.Text,
                Color       = txtbx_color.Text,
                Adress      = txtbx_adress.Text,
                Type        = txtbx_type.Text,
                Size        = txtbx_size.Text,
                Breed       = txtbx_breed.Text,
                Description = txtbx_descript.Text
            };

            InputOutputMessage.AddMessage(message);
            //Session["IsStudentAdded"] = true;
            //Response.Redirect(Request.Url.AbsoluteUri);
        }