Пример #1
0
 protected void ChangeTypeDocument(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(ddl_type_documents.SelectedValue))
     {
         TemplateLite template = this.Template[ddl_type_documents.SelectedValue];
         if (!string.IsNullOrEmpty(template.idDiagram))
         {
             DiagrammaStato diagramma = WsInstance.getDiagrammaById(template.idDiagram);
             if (diagramma != null && diagramma.STATI.Length > 0)
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Items.Add("");
                 ddl_state_document.Enabled = true;
                 for (int i = 0; i < diagramma.STATI.Length; i++)
                 {
                     ddl_state_document.Items.Add(diagramma.STATI[i].DESCRIZIONE);
                     ddl_state_document.Items[i + 1].Value = (diagramma.STATI[i].SYSTEM_ID).ToString();
                 }
             }
             else
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Enabled = false;
             }
         }
         else
         {
             ddl_state_document.Items.Clear();
             ddl_state_document.Enabled = false;
         }
         this.btnCampiProfilati.OnClientClick = String.Format("OpenCampiProfilati('" + ddl_type_documents.SelectedValue + "');");
         this.btnCampiProfilati.Enabled       = true;
         this.TemplateProf = null;
     }
     else
     {
         ddl_state_document.Items.Clear();
         ddl_state_document.Enabled     = false;
         this.btnCampiProfilati.Enabled = false;
     }
     this.upStateTypeDocument.Update();
 }
Пример #2
0
 protected void updateStateDiagram()
 {
     if (!string.IsNullOrEmpty(ddl_type_documents.SelectedValue))
     {
         TemplateLite template = this.Template[ddl_type_documents.SelectedValue];
         if (!string.IsNullOrEmpty(template.idDiagram))
         {
             DiagrammaStato diagramma = WsInstance.getDiagrammaById(template.idDiagram);
             if (diagramma != null && diagramma.STATI.Length > 0)
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Items.Add("");
                 ddl_state_document.Enabled = true;
                 for (int i = 0; i < diagramma.STATI.Length; i++)
                 {
                     ddl_state_document.Items.Add(diagramma.STATI[i].DESCRIZIONE);
                     ddl_state_document.Items[i + 1].Value = (diagramma.STATI[i].SYSTEM_ID).ToString();
                 }
             }
             else
             {
                 ddl_state_document.Items.Clear();
                 ddl_state_document.Enabled = false;
             }
         }
         else
         {
             ddl_state_document.Items.Clear();
             ddl_state_document.Enabled = false;
         }
     }
     else
     {
         ddl_state_document.Items.Clear();
         ddl_state_document.Enabled = false;
     }
 }