Пример #1
0
        protected void btn_addListing_Click(object sender, EventArgs e)
        {
            DBServiceReference.Service1Client client = new DBServiceReference.Service1Client();
            string title = dd_gem.SelectedValue;
            Gem    x     = client.GetGemByTitle(title);
            string pc    = x.Partner.ToString();
            string type  = x.Type.ToString();

            if (lb_gem1_listing.Text == "-")
            {
                lb_gem1_listing.Text = title;
                lb_gem1_pc.Text      = pc;
                lb_gem1_type.Text    = type;
            }
            else if (lb_gem2_listing.Text == "-")
            {
                lb_gem2_listing.Text = title;
                lb_gem2_pc.Text      = pc;
                lb_gem2_type.Text    = type;
            }
            else if (lb_gem3_pc.Text == "-")
            {
                lb_gem3_lisitng.Text = title;
                lb_gem3_pc.Text      = pc;
                lb_gem3_type.Text    = type;
            }
            else
            {
                lb_adderror.Text      = "Max Listings Have Been Reached";
                lb_adderror.ForeColor = System.Drawing.Color.Red;
            }
        }