public frmProcess(Form parent) { InitializeComponent(); this.Owner = parent; this.Location = new Point(this.Owner.Location.X + 20, this.Owner.Location.Y + 20); mode = 1; lblCreated.Visible = false; this.Text = "Nowe zgłoszenie"; _this = new Process(); DatesChange(); cmbStatus.Enabled = false; cmbStartedBy.Enabled = false; cmbFinishedBy.Enabled = false; txtFinishedOn.Enabled = false; txtStartedOn.Enabled = false; lblMesId.Visible = false; txtMesId.Visible = false; lblDescription.Text = "Opis"; txtDescription.Text = _this.Description; txtRepairActions.Visible = false; txtInitialDiagnosis.Visible = false; lblRepairActions.Visible = false; lblInitialDiagnosis.Visible = false; assignedUsersHandler = new AssignedUsersHandler(this); files = new FileKeeper(this); }
public frmProcess(Process Process, Form parent) { InitializeComponent(); this.Owner = parent; this.Location = new Point(this.Owner.Location.X + 20, this.Owner.Location.Y + 20); mode = 2; this.Text = "Szczegóły zgłoszenia"; _this = Process; DatesChange(); if (_this.CreatedOn != null && _this.CreatedBy != 0) { lblCreated.Text = "Utworzone w dniu " + _this.CreatedOn + " przez " + _this.CreatedByName; lblCreated.Visible = true; } txtOutput.Text = _this.Output; assignedUsersHandler = new AssignedUsersHandler(this); assignedUsersHandler.ProcessId = Process.ProcessId; files = new FileKeeper(this, null, null, Process.ProcessId); }
private async void btnReassign_Click(object sender, EventArgs e) { if (dgItems.SelectedRows.Count == 0) { MessageBox.Show("Żaden wiersz nie jest zaznaczony. Aby zmienić przpisanych obsługujących do wybranych wierszy, najpierw zaznacz je kliknięciem po ich lewej stronie."); } else { List <int> SelectedRows = new List <int>(); for (int i = 0; i < dgItems.SelectedRows.Count; i++) { SelectedRows.Add((int)dgItems.SelectedRows[i].Cells[0].Value); } AssignedUsersHandler assignedUsersHandler = new AssignedUsersHandler(this); await assignedUsersHandler.LoadUsers(); assignedUsersHandler.ShowDialog(); looper.Show(this); await Keeper.ReassignUsers(SelectedRows, assignedUsersHandler.AssignedUsers); looper.Hide(); } }