protected string GetDescrPolicy(PolicyPARER policy) { return(policy.descrizione); }
protected bool GetStatoAttivazionePolicy(PolicyPARER policy) { return(policy.isAttiva.Equals("1")); }
protected string GetCodPolicy(PolicyPARER policy) { return(policy.codice); }
protected string GetIdPolicy(PolicyPARER policy) { return(policy.id); }
protected bool GetStatoNotificaMail(PolicyPARER policy) { return(policy.notificaMail.Equals("1")); }
protected void LoadPolicy() { string idPolicy = Request.QueryString["id"].ToString(); PolicyPARER policy = this.WsInstance.GetPolicyPARERById(idPolicy); if (policy != null) { this.txtCodPolicy.Text = policy.codice; this.txtDescrPolicy.Text = policy.descrizione; // RUOLO RESPONSABILE if (!string.IsNullOrEmpty(policy.idGruppoRuoloResp)) { Ruolo ruoloResp = UserManager.getRuoloByIdGruppo(policy.idGruppoRuoloResp, this.Page); if (ruoloResp != null) { this.txtCodRuoloResp.Text = ruoloResp.codiceRubrica; this.txtDescRuoloResp.Text = ruoloResp.descrizione; this.id_corr_resp.Value = policy.idGruppoRuoloResp; } } // STATO CONSERVAZIONE this.rbl_stato_versamento.SelectedValue = policy.statoVersamento; // TIPO REGISTRO if (!string.IsNullOrEmpty(policy.tipoRegistroStampa)) { this.rblRegType.SelectedValue = policy.tipoRegistroStampa; } // REPERTORI, AOO, RF if (!string.IsNullOrEmpty(policy.idRepertorio)) { this.ddl_rep.SelectedValue = policy.idRepertorio; } if (!string.IsNullOrEmpty(policy.idRegistro)) { this.ddl_reg_aoo.SelectedValue = policy.idRegistro; } if (!string.IsNullOrEmpty(policy.idRF)) { this.ddl_rf.SelectedValue = policy.idRF; } // ANNO E DATA STAMPA this.txtYear.Text = policy.annoStampa; if (!string.IsNullOrEmpty(policy.filtroDataStampa)) { this.ddl_dataStampa_E.SelectedValue = policy.filtroDataStampa; if (policy.filtroDataStampa.Equals("R")) { this.lbl_dataStampaDa.Visible = true; this.lbl_dataStampaA.Visible = true; this.lblDa.Text = "Da"; this.lblDa.Visible = true; this.lblA.Visible = true; } else if (policy.filtroDataStampa.Equals("S")) { this.lbl_dataStampaDa.Visible = true; this.lbl_dataStampaA.Visible = false; this.lblDa.Text = "Il"; this.lblDa.Visible = true; this.lblA.Visible = false; } else { this.lbl_dataStampaDa.Visible = false; this.lbl_dataStampaA.Visible = false; this.lblDa.Visible = false; this.lblA.Visible = false; } if (!string.IsNullOrEmpty(policy.numGiorniStampa)) { this.txt_days_pr.Text = policy.numGiorniStampa; } } if (!string.IsNullOrEmpty(policy.dataStampaDa)) { this.lbl_dataStampaDa.Text = policy.dataStampaDa; } if (!string.IsNullOrEmpty(policy.dataStampaA)) { this.lbl_dataStampaA.Text = policy.dataStampaA; } // ENTE E STRUTTURA this.txt_custom_ente.Text = policy.ente; this.txt_custom_struttura.Text = policy.struttura; // PERIODICITA' switch (policy.periodicita) { case "D": this.chk_exec_daily.Checked = true; this.Periodicity_CheckedChanged(this.chk_exec_daily, null); break; case "W": this.chk_exec_weekly.Checked = true; this.Periodicity_CheckedChanged(this.chk_exec_weekly, null); this.ddl_weekday.SelectedValue = policy.giornoEsecuzione; break; case "M": this.chk_exec_monthly.Checked = true; this.Periodicity_CheckedChanged(this.chk_exec_monthly, null); this.ddl_day_month.SelectedValue = policy.giornoEsecuzione; break; case "Y": this.chk_exec_yearly.Checked = true; this.Periodicity_CheckedChanged(this.chk_exec_yearly, null); this.ddl_day_year.SelectedValue = policy.giornoEsecuzione; this.ddl_month_year.SelectedValue = policy.meseEsecuzione; break; case "O": this.chk_exec_once.Checked = true; this.Periodicity_CheckedChanged(this.chk_exec_once, null); this.lbl_cal_once.Text = policy.dataEsecuzione; break; } // Se la policy è attiva il tasto "salva" deve essere disabilitato if (!string.IsNullOrEmpty(policy.isAttiva) && policy.isAttiva.Equals("1")) { this.btn_salva.Enabled = false; this.btn_salva.ToolTip = "La policy è attualmente attiva e pertanto non può essere modificata"; } else { this.btn_salva.Enabled = true; } } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "getPolicyError", "getPolicyError();", true); } }
protected DocsPAWA.DocsPaWR.PolicyPARER PopolaOggettoPolicy() { DocsPAWA.DocsPaWR.PolicyPARER policy = new PolicyPARER(); policy.codice = this.txtCodPolicy.Text; policy.descrizione = this.txtDescrPolicy.Text; policy.idAmm = this.IdAmministrazione.ToString(); policy.tipo = "S"; policy.statoVersamento = this.rbl_stato_versamento.SelectedValue; policy.tipoRegistroStampa = this.rblRegType.SelectedValue; policy.idRepertorio = this.ddl_rep.SelectedValue; policy.idRegistro = this.ddl_reg_aoo.SelectedValue; policy.idRF = this.ddl_rf.SelectedValue; policy.annoStampa = this.txtYear.Text; policy.filtroDataStampa = this.ddl_dataStampa_E.SelectedValue; if (this.ddl_dataStampa_E.SelectedValue.Equals("R")) { policy.dataStampaDa = this.lbl_dataStampaDa.Text; policy.dataStampaA = this.lbl_dataStampaA.Text; } else if (this.ddl_dataStampa_E.SelectedValue.Equals("S")) { policy.dataStampaDa = this.lbl_dataStampaDa.Text; policy.dataStampaA = string.Empty; } else { policy.dataStampaDa = string.Empty; policy.dataStampaA = string.Empty; } if (this.ddl_dataStampa_E.SelectedValue.Equals("P")) { policy.numGiorniStampa = this.txt_days_pr.Text; } else { policy.numGiorniStampa = string.Empty; } if (this.chk_exec_daily.Checked) { policy.periodicita = "D"; } else if (this.chk_exec_weekly.Checked) { policy.periodicita = "W"; policy.giornoEsecuzione = this.ddl_weekday.SelectedValue; } else if (this.chk_exec_monthly.Checked) { policy.periodicita = "M"; policy.giornoEsecuzione = this.ddl_day_month.SelectedValue; } else if (this.chk_exec_yearly.Checked) { policy.periodicita = "Y"; policy.giornoEsecuzione = this.ddl_day_year.SelectedValue; policy.meseEsecuzione = this.ddl_month_year.SelectedValue; } else if (this.chk_exec_once.Checked) { policy.periodicita = "O"; policy.dataEsecuzione = this.lbl_cal_once.Text; } policy.ente = this.txt_custom_ente.Text; policy.struttura = this.txt_custom_struttura.Text; policy.idGruppoRuoloResp = this.id_corr_resp.Value; return(policy); }