Exemplo n.º 1
0
        public void approvedPosts()
        {
            localhost.Service1 server = new localhost.Service1();
            localhost.Post     PRO    = new localhost.Post();
            BindingSource      bs     = new BindingSource();

            bs.DataSource         = server.getapprovedpost();
            dgapproved.DataSource = bs;
        }
Exemplo n.º 2
0
        public void showPostPend()
        {
            localhost.Service1 server = new localhost.Service1();
            localhost.Post     PRO    = new localhost.Post();
            BindingSource      bs     = new BindingSource();

            bs.DataSource             = server.getPendingpostlist();
            dgPendingAdmin.DataSource = bs;
        }
Exemplo n.º 3
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            localhost.Service1 server = new localhost.Service1();
            bool postidspecified      = true;

            if (e.ColumnIndex == 0)
            {
                localhost.Post post = server.getpost(e.RowIndex, postidspecified);
                PostDetails    pd   = new PostDetails();
                pd.setTitle(post.Title);
                pd.setCategory(post.Category);
                pd.setdescription(post.Description);
                pd.Show();
            }
        }
Exemplo n.º 4
0
 private void lbladdpost_Click(object sender, EventArgs e)
 {
     localhost.Service1 server = new localhost.Service1();
     //server.addpost(txtposttitle.Text , txtpostcategory.Text ,txtpostdescription.Text);
     localhost.Post po = new localhost.Post();
     po.Title       = txtposttitle.Text;
     po.Category    = txtpostcategory.Text;
     po.Description = txtpostdescription.Text;
     server.postingthepost(po);
     if (string.IsNullOrWhiteSpace(txtposttitle.Text) && string.IsNullOrWhiteSpace(txtpostcategory.Text) && string.IsNullOrWhiteSpace(txtpostdescription.Text))
     {
         MessageBox.Show("Empty");
     }
     else
     {
         MessageBox.Show("Posted Succesfully Now Wait For Approval");
     }
     txtposttitle.Text       = "";
     txtpostcategory.Text    = "";
     txtpostdescription.Text = "";
 }
Exemplo n.º 5
0
 public PostDetails(localhost.Post post)
 {
     InitializeComponent();
     postShow = post;
 }