Ejemplo n.º 1
0
        private void tsbCloseOffer_Click(object sender, EventArgs e)
        {
            OfferItems      item  = offerItemsList[tabControl1.SelectedIndex];
            BuyerOfferItems bItem = item as BuyerOfferItems;

            bItem.UpdateOfferState((int)OfferState.Closed);
        }
Ejemplo n.º 2
0
        private void tsbRoute_Click(object sender, EventArgs e)
        {
            OfferItems item = offerItemsList[tabControl1.SelectedIndex];

            if (DialogResult.Yes == MessageBox.Show("Route the Offer?", "", MessageBoxButtons.YesNo))
            {
                BuyerOfferItems bItem = item as BuyerOfferItems;
                bItem.UpdateOfferState((int)OfferState.Routed);
            }
        }
Ejemplo n.º 3
0
        private void tsbRoute_Click(object sender, EventArgs e)
        {
            OfferItems item = offerItemsList[tabControl1.SelectedIndex];

            if (DialogResult.Yes == MessageBox.Show("Route the Offer?", "", MessageBoxButtons.YesNo))
            {
                BuyerOfferItems bItem = item as BuyerOfferItems;
                bItem.UpdateOfferState((int)OfferState.Routed);
                this.tsbRoute.Enabled = false;
                OfferMgr.OfferMgr.SendOfferRouteEmail(bItem.GetOfferId());
            }
            this.DialogResult = DialogResult.Yes;
        }
Ejemplo n.º 4
0
 private void tsbUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         OfferItems      item  = offerItemsList[tabControl1.SelectedIndex];
         BuyerOfferItems bItem = item as BuyerOfferItems;
         bItem.UpdateItems();
     }
     catch (Exception ex)
     {
         Logger.Error(ex.Message);
         Logger.Error(ex.StackTrace);
         MessageBox.Show("Update offer error");
     }
 }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
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);
        }