Exemple #1
0
 /// <summary>
 /// adjust the window-view on the window if active request is coming
 /// possible modes are - delete, details, giveout, modify
 /// </summary>
 /// <param name="rec">the record inf.container</param>
 /// <param name="mod">mode of the window</param>
 private void adjustActiveRecFields(RequestRecordActive rec)
 {
     fillUpActiveFields(rec);
     if (purposeOfTheWindow == RequestWindowPuropse.DetailsOfActive)
     {
         adjustReadOnlyCase();
         buttonOk.Visible = false;
     }
     else if (purposeOfTheWindow == RequestWindowPuropse.GivingOutTheActive)
     {
         adjustReadOnlyCase();
         buttonOk.Visible = true;
         buttonOk.Text    = "Kiadás";
     }
     else if (purposeOfTheWindow == RequestWindowPuropse.MorifyTheActive)
     {
         adjustModfyCase();
         fillUpTheProductsField();
         buttonOk.Visible = true;
         buttonOk.Text    = "Módosítás";
     }
     else if (purposeOfTheWindow == RequestWindowPuropse.DeleteTheActive)
     {
         adjustReadOnlyCase();
         buttonOk.Visible = true;
         buttonOk.Text    = "Törlés";
     }
 }
        /// <summary>
        /// fill up the fields with text with active record content
        /// </summary>
        /// <param name="rec"></param>
        private void fillUpActiveFields(RequestRecordActive rec)
        {
            textBoxName.Text      = rec.userKeroNev;
            textBoxArea.Text      = rec.userTerulet;
            textBoxStartDate.Text = rec.keresDatum;
            textBoxAmount.Text    = Convert.ToString(rec.keresMennyiseg);
            comboBoxProducts.Items.Add(rec.termekNev);
            comboBoxProducts.SelectedIndex = 0;
            comboBoxStrippings.Items.Add(rec.termekKiszerel);
            comboBoxStrippings.SelectedIndex = 0;
            textBoxPlacing.Text  = rec.termekHely;
            textBoxSubcontr.Text = rec.termekBeszall;
            infoLabel.Text       = "Aktív kérés\n";
            if (rec.keresModosNev != null)
            {
                infoLabel.Text += "Legutóbb módosította: " + rec.keresModosNev;
            }
            userIdOfRequester = rec.userId;     //all change case needs that
            requestID         = rec.keresId;

            oldStrippingID   = rec.termekQuantId;  //for the case of the modifing the record content
            oldProductID     = rec.termekId;
            oldProductName   = rec.termekNev;
            oldStrippingName = rec.termekKiszerel.ToString();
            oldPlacing       = rec.termekHely;
            oldSubcontr      = rec.termekBeszall;
            chosenNewStrippingID_DurringModify = oldStrippingID;
        }
Exemple #3
0
 public ServiceRequestsWinController(RequestRecordActive rec, RequestWindowPuropse mode, ServiceRequests servReq,
                                     Form parentReq)
 {
     serviceRequests         = servReq;
     this.requestWindow      = parentReq;
     this.purposeOfTheWindow = mode;
     catchTheControls();
     adjustActiveRecFields(rec);
 }
Exemple #4
0
 public FormServiceRequestsWindow(RequestRecordActive rec, RequestWindowPuropse mode, Form parMain,
                                  ServiceRequests servRequ)
 {
     this.parentMainWin = parMain;
     InitializeComponent();
     requestController = new ServiceRequestsWinController(rec, mode, servRequ, this);
     this.Show();
     parentMainWin.Hide();
 }