public ServiceRequestsWinController(RequestRecordDeleted rec, RequestWindowPuropse mode, ServiceRequests servReq, Form parentReq) { serviceRequests = servReq; this.requestWindow = parentReq; this.purposeOfTheWindow = mode; catchTheControls(); adjustDeletedRecFields(rec); }
public FormServiceRequestsWindow(RequestRecordDeleted rec, RequestWindowPuropse mode, Form parMain, ServiceRequests servRequ) { this.parentMainWin = parMain; InitializeComponent(); requestController = new ServiceRequestsWinController(rec, mode, servRequ, this); this.Show(); parentMainWin.Hide(); }
/// <summary> /// ajust the window-view on the window - case of deleted request is coming /// </summary> /// <param name="rec">deleted record</param> private void adjustDeletedRecFields(RequestRecordDeleted rec) { fillUpDeletedFields(rec); if (purposeOfTheWindow == RequestWindowPuropse.DetailsOfDeleted) { adjustReadOnlyCase(); buttonOk.Visible = false; } else if (purposeOfTheWindow == RequestWindowPuropse.RenewTheDeleted) { adjustReadOnlyCase(); buttonOk.Visible = true; buttonOk.Text = "Visszaállítás"; } }
/// <summary> /// fills up with the deleted recors informations /// </summary> /// <param name="rec">deleted record</param> private void fillUpDeletedFields(RequestRecordDeleted 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.termekQuantId); comboBoxStrippings.SelectedIndex = 0; textBoxPlacing.Visible = false; labelPlacing.Visible = false; textBoxSubcontr.Text = rec.termekBeszall; infoLabel.Text = "Törölt kérés\n"; infoLabel.Text += "Legutóbb módosította: " + rec.keresModosNev; userIdOfRequester = rec.userId; oldStrippingID = rec.termekQuantId; }