Exemple #1
0
    protected void jousave_Click(object sender, EventArgs e)
    {
        Journalshared joupap = new Journalshared();

        joupap.Jtitle = txtJtitle.Text;

        joupap.Jcity = txtJcity.Text;

        joupap.Jclass = int.Parse(txtJclass.Text);

        joupap.Jsub = txtJsub.Text;



        HttpChannel chnl0 = new HttpChannel();

        ChannelServices.RegisterChannel(chnl0, false);

        IJournalManger serve = (IJournalManger)Activator.GetObject(typeof(IJournalManger), "http://localhost:1234/journalservice.soap");
        int            s     = serve.save(joupap);

        lblResult.Text    = "Journal Add succficly" + " AND  its ID      " + s;
        lblResult.Visible = true;
        jouresult.Visible = false;

        ChannelServices.UnregisterChannel(chnl0);
    }
Exemple #2
0
    protected void joudel_Click(object sender, EventArgs e)
    {
        HttpChannel chn23 = new HttpChannel();

        ChannelServices.RegisterChannel(chn23, false);

        IJournalManger serve = (IJournalManger)Activator.GetObject(typeof(IJournalManger), "http://localhost:1234/journalservice.soap");

        Journalshared showjou = new Journalshared();
        int           d       = int.Parse(searchtxt.Text);


        serve.delete(d);
        jouresult.Visible = false;
        joudel.Visible    = false;
        lblResult.Text    = " Journal deleted Succeded ";
        lblResult.Visible = true;
        ChannelServices.UnregisterChannel(chn23);
    }
Exemple #3
0
    protected void search_Click(object sender, EventArgs e)
    {
        Journalshared showjou = new Journalshared();

        int         p     = int.Parse(searchtxt.Text);
        HttpChannel chn22 = new HttpChannel();

        ChannelServices.RegisterChannel(chn22, false);

        IJournalManger serve = (IJournalManger)Activator.GetObject(typeof(IJournalManger), "http://localhost:1234/journalservice.soap");

        showjou = serve.getById(p);

        txtJtitle.Text = showjou.Jtitle;
        txtJcity.Text  = showjou.Jcity;
        txtJsub.Text   = showjou.Jsub;
        txtJclass.Text = Convert.ToString(showjou.Jclass);

        jouresult.Visible = true;
        joudel.Visible    = true;

        ChannelServices.UnregisterChannel(chn22);
    }
Exemple #4
0
    protected void joudmod_Click(object sender, EventArgs e)
    {
        HttpChannel chn33 = new HttpChannel();

        ChannelServices.RegisterChannel(chn33, false);

        IJournalManger serve = (IJournalManger)Activator.GetObject(typeof(IJournalManger), "http://localhost:1234/journalservice.soap");

        Journalshared showjou = new Journalshared();
        int           p       = int.Parse(searchtxt.Text);

        showjou.JId    = p;
        showjou.Jtitle = txtJtitle.Text;
        showjou.Jcity  = txtJcity.Text;
        showjou.Jsub   = txtJsub.Text;
        showjou.Jclass = int.Parse(txtJclass.Text);

        serve.modifaypaper(showjou);
        jouresult.Visible = false;
        joumod.Visible    = false;
        lblResult.Text    = " Journal Modfiy Succeded ";
        lblResult.Visible = true;
        ChannelServices.UnregisterChannel(chn33);
    }