Exemplo n.º 1
0
        private void OfferList_Load(object sender, EventArgs e)
        {
            for(int i=0;i<offerList.Count;i++)
            {
                OfferItems offerItems;
                if (UserInfo.Job == JobDescription.Sales || UserInfo.Job == JobDescription.SalesManager)
                {
                    offerItems = new SalesOfferItems();

                }
                else
                {
                   offerItems = new BuyerOfferItems();
                }
            offerItems.Dock = System.Windows.Forms.DockStyle.Fill;
            offerItems.Location = new System.Drawing.Point(3, 3);
            offerItems.Name = "OfferItems"+i;
            offerItems.Size = new System.Drawing.Size(906, 456);
            offerItems.TabIndex = 0;
            offerItems.FillTheTable(offerList[i]);
            offerItemsList.Add(offerItems);
            }
             //   List<TabPage> tabPageList=new List<TabPage>();

            for(int i=0;i<offerItemsList.Count;i++)
            {
                System.Windows.Forms.TabPage tabPage = new TabPage();

               tabPage.Controls.Add(offerItemsList[i]);
               tabPage.Location = new System.Drawing.Point(4, 22);
               tabPage.Name = "tabPage"+i;
               tabPage.Padding = new System.Windows.Forms.Padding(3);
               tabPage.Size = new System.Drawing.Size(912, 462);
               tabPage.TabIndex = 0;
               tabPage.Text = "Offer"+i;
               tabPage.UseVisualStyleBackColor = true;
               this.tabControl1.Controls.Add(tabPage);
            }
            tabControl1_SelectedIndexChanged(this, null);
        }
Exemplo n.º 2
0
        private void OfferList_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < offerList.Count; i++)
            {
                OfferItems offerItems;
                if (UserInfo.Job == JobDescription.Sales || UserInfo.Job == JobDescription.SalesManager)
                {
                    offerItems = new SalesOfferItems();
                }
                else
                {
                    offerItems = new BuyerOfferItems();
                }
                offerItems.Dock     = System.Windows.Forms.DockStyle.Fill;
                offerItems.Location = new System.Drawing.Point(3, 3);
                offerItems.Name     = "OfferItems" + i;
                offerItems.Size     = new System.Drawing.Size(906, 456);
                offerItems.TabIndex = 0;
                offerItems.FillTheTable(offerList[i]);
                offerItemsList.Add(offerItems);
            }
            //   List<TabPage> tabPageList=new List<TabPage>();

            for (int i = 0; i < offerItemsList.Count; i++)
            {
                System.Windows.Forms.TabPage tabPage = new TabPage();

                tabPage.Controls.Add(offerItemsList[i]);
                tabPage.Location = new System.Drawing.Point(4, 22);
                tabPage.Name     = "tabPage" + i;
                tabPage.Padding  = new System.Windows.Forms.Padding(3);
                tabPage.Size     = new System.Drawing.Size(912, 462);
                tabPage.TabIndex = 0;
                tabPage.Text     = "Offer" + i;
                tabPage.UseVisualStyleBackColor = true;
                this.tabControl1.Controls.Add(tabPage);
            }
            tabControl1_SelectedIndexChanged(this, null);
        }