Example #1
0
 private void ProcessesGrid_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
 {
     if (!SaveData())
     {
         return;
     }
     MultiXTpmDB.ProcessClassRow Row = m_DS.ProcessClass.FindByID((int)ProcessesGrid.DataKeys[e.Item.ItemIndex]);
     foreach (MultiXTpmDB.GroupProcessClassesRow PRow    in      Row.GetGroupProcessClassesRows())
     {
         if (PRow.GroupID == m_GroupID)
         {
             PRow.Delete();
             break;
         }
     }
     BindAll();
 }
Example #2
0
        private void    SetFieldsState()
        {
            NewProcessClassBtn.CssClass   = "HiddenBtn";
            ParamsGrid.Columns[0].Visible = false;
            LinksGrid.Columns[0].Visible  = false;

            if (m_bEditMode)
            {
                ParamsGrid.Columns[0].Visible     = true;
                LinksGrid.Columns[0].Visible      = true;
                ProcessClassName.ReadOnly         = false;
                AdditionalConfigTextFile.ReadOnly = false;
                ProcessClassID.ReadOnly           = true;
                Description.ReadOnly        = false;
                PasswordToSend.ReadOnly     = false;
                ExpectedPassword.ReadOnly   = false;
                DefaultSendTimeout.ReadOnly = false;
                AutoStart.Enabled           = true;
                MaxQueueSize.ReadOnly       = false;
                MaxSessions.ReadOnly        = false;
                DebugLevel.ReadOnly         = false;
                if (m_ProcessClassRow.AutoStart)
                {
                    ExecCmd.ReadOnly           = false;
                    ExecParams.ReadOnly        = false;
                    MinInstances.ReadOnly      = false;
                    MaxInstances.ReadOnly      = false;
                    StartProcessDelay.ReadOnly = false;
                    InactivityTimer.ReadOnly   = false;
                }
                else
                {
                    ExecCmd.ReadOnly    = true;
                    ExecParams.ReadOnly = true;
//					MinInstances.ReadOnly	=	true;
                    MaxInstances.ReadOnly      = true;
                    StartProcessDelay.ReadOnly = true;
                    InactivityTimer.ReadOnly   = true;
                }
                EditBtn.Enabled             = false;
                SaveBtn.Enabled             = true;
                DeleteBtn.Enabled           = m_ProcessClassRow.GetGroupProcessClassesRows().Length == 0;
                CancelBtn.Enabled           = true;
                NewProcessClassBtn.Enabled  = false;
                ShowProcessClassBtn.Enabled = false;
                ParamsInput.Visible         = true;
                LinksTable.Visible          = true;
            }
            else
            if (m_bNewProcessClass)
            {
                AdditionalConfigTextFile.ReadOnly = false;
                ProcessClassName.ReadOnly         = true;
                ProcessClassID.ReadOnly           = false;
                Description.ReadOnly        = true;
                PasswordToSend.ReadOnly     = true;
                ExpectedPassword.ReadOnly   = true;
                DefaultSendTimeout.ReadOnly = true;
                AutoStart.Enabled           = false;
                MaxQueueSize.ReadOnly       = true;
                MaxSessions.ReadOnly        = true;
                DebugLevel.ReadOnly         = true;
                ExecCmd.ReadOnly            = true;
                ExecParams.ReadOnly         = true;
                MinInstances.ReadOnly       = true;
                MaxInstances.ReadOnly       = true;
                StartProcessDelay.ReadOnly  = true;
                InactivityTimer.ReadOnly    = true;

                EditBtn.Enabled             = false;
                SaveBtn.Enabled             = true;
                DeleteBtn.Enabled           = false;
                CancelBtn.Enabled           = true;
                NewProcessClassBtn.Enabled  = false;
                ShowProcessClassBtn.Enabled = false;
                ParamsInput.Visible         = false;
                LinksTable.Visible          = false;
            }
            else
            {
                AdditionalConfigTextFile.ReadOnly = true;
                ProcessClassName.ReadOnly         = true;
                ProcessClassID.ReadOnly           = false;
                Description.ReadOnly        = true;
                PasswordToSend.ReadOnly     = true;
                ExpectedPassword.ReadOnly   = true;
                DefaultSendTimeout.ReadOnly = true;
                AutoStart.Enabled           = false;
                MaxQueueSize.ReadOnly       = true;
                MaxSessions.ReadOnly        = true;
                DebugLevel.ReadOnly         = true;
                ExecCmd.ReadOnly            = true;
                ExecParams.ReadOnly         = true;
                MinInstances.ReadOnly       = true;
                MaxInstances.ReadOnly       = true;
                StartProcessDelay.ReadOnly  = true;
                InactivityTimer.ReadOnly    = true;
                if (m_ProcessClassRow == null)
                {
                    EditBtn.Enabled = false;
                }
                else
                {
                    EditBtn.Enabled = true;
                }

                SaveBtn.Enabled             = false;
                DeleteBtn.Enabled           = false;
                CancelBtn.Enabled           = false;
                NewProcessClassBtn.Enabled  = true;
                ShowProcessClassBtn.Enabled = true;
                ParamsInput.Visible         = false;
                LinksTable.Visible          = false;
            }
        }