private void Page_Load(object sender, System.EventArgs e) { Response.Expires = -1; if (!this.IsPostBack) { this.btn_annulla.Attributes["onClick"] = "ClosePage(false);"; DocsPaWR.SchedaDocumento schedaDocumento = DocumentManager.getDocumentoSelezionato(this); string ownerUser; // Verifica se il documento è in stato checkout if (CheckInOutServices.IsCheckedOutDocumentWithUser(out ownerUser)) { bool isOwnerCheckedOut = (ownerUser.ToUpper() == UserManager.getInfoUtente().userId.ToUpper()); this.lbl_messageOwnerCheckOut.Visible = isOwnerCheckedOut; this.lbl_messageCheckOut.Visible = !isOwnerCheckedOut; this.lbl_message.Visible = false; this.btn_ok.Visible = isOwnerCheckedOut; if (isOwnerCheckedOut) { this.btn_ok.Attributes.Add("onClick", "RemoveCheckOutVersion();"); } } else { this.lbl_messageOwnerCheckOut.Visible = false; this.lbl_messageCheckOut.Visible = false; this.lbl_message.Visible = true; } } }
private void Page_Load(object sender, System.EventArgs e) { result = ""; Response.Expires = -1; this.txt_note.Focus(); if (!this.IsPostBack) { this.btn_annulla.Attributes["onClick"] = "ClosePage(false);"; DocsPaWR.SchedaDocumento schedaDocumento = DocumentManager.getDocumentoSelezionato(this); string ownerUser; bool isCheckedOut = CheckInOutServices.IsCheckedOutDocumentWithUser(out ownerUser); // Verifica se il documento è in stato checkout if (isCheckedOut) { this.IsOwnerCheckedOut = (ownerUser.ToUpper() == UserManager.getInfoUtente().userId.ToUpper()); this.lbl_messageCheckOut.Visible = !this.IsOwnerCheckedOut; this.lbl_messageOwnerCheckOut.Visible = this.IsOwnerCheckedOut; this.btn_ok.Visible = this.IsOwnerCheckedOut; this.lbl_note.Visible = false; this.txt_note.Visible = false; this.lbl_result.Text = string.Empty; } else { this.lbl_messageCheckOut.Visible = false; this.lbl_messageOwnerCheckOut.Visible = false; this.lbl_mess_conf_rimuovi.Visible = true; result = DocumentManager.verificaDirittiCestinaDocumento(this, schedaDocumento); this.lbl_note.Visible = (result == "Del"); //luluciani 17/06/2008 this.btn_ok.Visible = (result == "Del"); this.lbl_mess_conf_rimuovi.Visible = (result == "Del"); this.txt_note.Visible = this.lbl_note.Visible; if (!this.lbl_note.Visible) { this.lbl_result.Text = result; } } } tastoInvio(); }
protected void Page_Load(object sender, EventArgs e) { try { this.TxtNote.Focus(); if (!IsPostBack) { this.InitPage(); string ownerUser; bool isCheckedOut = CheckInOutServices.IsCheckedOutDocumentWithUser(out ownerUser); // Verifica se il documento è in stato checkout if (isCheckedOut) { this.IsOwnerCheckedOut = (ownerUser.ToUpper() == UserManager.GetInfoUser().userId.ToUpper()); this.plcMessageCheckOut.Visible = true; this.lbl_messageCheckOut.Visible = !this.IsOwnerCheckedOut; this.lbl_messageOwnerCheckOut.Visible = this.IsOwnerCheckedOut; this.BtnOk.Visible = this.IsOwnerCheckedOut; this.plcNote.Visible = false; this.lbl_result.Text = string.Empty; } else { this.plcMessageCheckOut.Visible = false; result = DocumentManager.verificaDirittiCestinaDocumento(this, this.DocumentInWorking); bool visibility = (result == "Del"); this.plcNote.Visible = visibility; this.BtnOk.Visible = visibility; this.plcMessageConfirm.Visible = visibility; if (!visibility) { this.plcMessageResult.Visible = true; this.lbl_result.Text = result; } } } this.RefreshScript(); } catch (System.Exception ex) { UIManager.AdministrationManager.DiagnosticError(ex); return; } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { this.InitializeLanguage(); // Verifica se il documento è in stato checkout bool isCheckedOut = CheckInOutServices.IsCheckedOutDocument(); //Verifica se il documento si trova nello stato finale DocsPaWR.Stato statoDoc = UIManager.DiagrammiManager.GetStateDocument(UIManager.DocumentManager.getSelectedRecord().docNumber); bool isFinalState = statoDoc != null ? statoDoc.STATO_FINALE : false; //verifica se il documento deve essere ancora accettato a seguito di una trasmissione bool isToAccept = UserManager.disabilitaButtHMDirittiTrasmInAccettazione(DocumentManager.getSelectedRecord().accessRights); //verifico se il repertorio può essere eliminato bool isNotCancel = isCheckedOut || isFinalState || isToAccept; string language = UIManager.UserManager.GetUserLanguage(); // preparo l'eventuale motivo del mancato annullamento if (isCheckedOut) { this.AbortCounterLliDesc.Text = Utils.Languages.GetLabelFromCode("ErroDocumentCheckOut", language) + "<br/>"; } if (isFinalState) { this.AbortCounterLliDesc.Text = Utils.Languages.GetLabelFromCode("ErroDocumentFinaleState", language) + "<br/>"; } if (isToAccept) { this.AbortCounterLliDesc.Text = Utils.Languages.GetLabelFromCode("ErroDocumentNotAccept", language) + "<br/>"; } if (isNotCancel) { this.AbortCounterBtnOk.Enabled = false; } else { // this.lbl_messageCheckOut.Style.Add("display", "none"); // this.lbl_messageCheckOut_descrizione.Style.Add("display", "none"); } } } catch (System.Exception ex) { UIManager.AdministrationManager.DiagnosticError(ex); return; } }
/// <summary> /// Verifica se il documento è in stato checkout /// </summary> /// <param name="message"></param> /// <returns></returns> protected bool IsCheckedOutDocument(out string message) { // Verifica stato documento principale bool retValue = CheckInOutServices.IsCheckedOutDocument(out message); if (!retValue) { // Verifica stato allegato selezionato per la rimozione il quale, se in checkout, non può essere elmininato string docNumber = Request.QueryString["docNumber"]; retValue = CheckInOutServices.IsCheckedOutDocument(docNumber, docNumber, UserManager.getInfoUtente(), false); if (retValue) { message = "L'allegato selezionato risulta bloccato."; } } return(retValue); }
protected void Page_Load(object sender, EventArgs e) { idOggetto = Request["idOggetto"]; docNumber = Request["docNumber"]; // Verifica se il documento è in stato checkout isCheckedOut = CheckInOutServices.IsCheckedOutDocument(); //Verifica se il documento si trova nello stato finale DocsPaWR.Stato statoDoc = DocsPAWA.DiagrammiManager.getStatoDoc(docNumber, this.Page); isFinalState = statoDoc != null ? statoDoc.STATO_FINALE : false; //verifica se il documento deve essere ancora accettato a seguito di una trasmissione isToAccept = UserManager.disabilitaButtHMDirittiTrasmInAccettazione(DocumentManager.getDocumentoSelezionato().accessRights); //verifico se il repertorio può essere eliminato isNotCancel = isCheckedOut || isFinalState || isToAccept; // preparo l'eventuale motivo del mancato annullamento if (isCheckedOut) { this.lbl_messageCheckOut_descrizione.Text = "Il documento è in checked out" + "<br/>"; } if (isFinalState) { this.lbl_messageCheckOut_descrizione.Text = "Il documento si trova nello stato finale" + "<br/>"; } if (isToAccept) { this.lbl_messageCheckOut_descrizione.Text = "Il documento deve essere ancora accettato" + "<br/>"; } if (isNotCancel) { this.lblAnnullamento.Style.Add("display", "none"); this.txt_note_annullamento.Style.Add("display", "none"); this.btn_ok.Style.Add("display", "none"); } else { this.lbl_messageCheckOut.Style.Add("display", "none"); this.lbl_messageCheckOut_descrizione.Style.Add("display", "none"); } }
private void Page_Load(object sender, System.EventArgs e) { Response.Expires = -1; this.SetDefaultButton(); if (!this.IsPostBack) { this.txt_note_annullamento.Attributes.Add("onChange", "AbilitaBtn();"); this.btn_ok.Attributes.Add("onClick", "ConfirmCancelProtocollo();"); DocsPaWR.SchedaDocumento schedaDocumento = DocumentManager.getDocumentoSelezionato(this); string ownerUser; // Verifica se il documento è in stato checkout if (CheckInOutServices.IsCheckedOutDocumentWithUser(out ownerUser)) { this.IsOwnerCheckedOut = (ownerUser == UserManager.getInfoUtente().userId); this.lbl_messageCheckOut.Visible = !this.IsOwnerCheckedOut; this.lbl_messageOwnerCheckOut.Visible = this.IsOwnerCheckedOut; this.LabelCodice.Visible = this.IsOwnerCheckedOut; this.txt_note_annullamento.Visible = this.IsOwnerCheckedOut; this.btn_ok.Visible = this.IsOwnerCheckedOut; } else { this.lbl_messageCheckOut.Visible = false; this.lbl_messageOwnerCheckOut.Visible = false; } } this.btn_ok.Enabled = (this.txt_note_annullamento.Text.Length > 0); }