Beispiel #1
0
        private void postBtn_Click(object sender, EventArgs e)
        {
            if (Privacy.Text == "")
            {
                Privacy.Focus();
                MessageBox.Show("Select Pravicy Level");
            }
            else
            {
                post     ps = new post();
                DateTime no = DateTime.Now;

                if (addPicPost.Visible == false && Text22.Text != "")
                {
                    ps.write_in_database_photo_text(login.me.Id, Text22.Text, no.ToString(), Privacy.Text, pos.image, idtag);
                }
                else if (addPicPost.Visible == false && Text22.Text == "")
                {
                    ps.write_in_database_photo(login.me.Id, no.ToString(), Privacy.Text, pos.image, idtag);
                }
                else if (addPicPost.Visible == true && Text22.Text != "")
                {
                    ps.write_in_database_text(login.me.Id, Text22.Text, no.ToString(), Privacy.Text, idtag);
                }



                this.Hide();
            }
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (list.Text == "")
            {
                list.Focus();
                MessageBox.Show("Select Pravicy Level");
            }
            else
            {
                post     ps = new post();
                DateTime no = DateTime.Now;

                if (pict.Visible == false && Text22.Text != "")
                {
                    ps.write_in_database_photo_text(login.me.Id, Text22.Text, no.ToString(), list.Text, pos.image);
                }
                else if (pict.Visible == false && Text22.Text == "")
                {
                    ps.write_in_database_photo(login.me.Id, no.ToString(), list.Text, pos.image);
                }
                else if (pict.Visible == false && Text22.Text != "")
                {
                    ps.write_in_database_text(login.me.Id, Text22.Text, no.ToString(), list.Text);
                }



                this.Close();
            }
        }