예제 #1
0
파일: V8.cs 프로젝트: hassangas2003/2sxc
        private void RemoveModuleControls(IEnumerable <string> controls)
        {
            logger.LogStep("08.--.--", "RemoveModuleControlls - Start", false);

            var desktopModuleNames = new[] { "2sxc", "2sxc-app" };

            // Remove settings and settingswrapper control
            foreach (var d in desktopModuleNames)
            {
                var dmi = DesktopModuleController.GetDesktopModuleByModuleName(d, -1);
                if (dmi != null)
                {
                    var mdi = dmi.ModuleDefinitions.FirstOrDefault();

                    if (mdi.Value != null)
                    {
                        foreach (var c in controls)
                        {
                            var settingsControl = ModuleControlController.GetModuleControlByControlKey(c, mdi.Value.ModuleDefID);
                            if (settingsControl != null)
                            {
                                ModuleControlController.DeleteModuleControl(settingsControl.ModuleControlID);
                            }
                        }
                    }
                }
            }
        }
예제 #2
0
        protected void grdControls_DeleteCommand(object source, DataGridCommandEventArgs e)
        {
            int controlID = Int32.Parse(e.CommandArgument.ToString());

            ModuleControlController.DeleteModuleControl(controlID);

            //Force Module Definition to refresh
            _ModuleDefinition = null;
            BindDefinition();
        }
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         ModuleControlController.DeleteModuleControl(controlId);
         this.lblUpdateStatus.Text = MiscUtility.MSG_UPDATE_SUCCESS;
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
 }
예제 #4
0
 private void cmdDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (!Null.IsNull(ModuleControlId))
         {
             ModuleControlController.DeleteModuleControl(ModuleControlId);
         }
         Response.Redirect(ReturnURL, true);
     }
     catch (Exception exc)
     {
         Exceptions.ProcessModuleLoadException(this, exc);
     }
 }
        protected void dtgModuleControls_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "editcontrol":
                Response.Redirect(AppEnv.AdminUrlParams("modulecon") + "&cid=" + e.CommandArgument.ToString());
                break;

            case "deletecontrol":
                try
                {
                    ModuleControlController.DeleteModuleControl(ConvertUtility.ToInt32(e.CommandArgument));
                    this.lblUpdateStatus.Text = MiscUtility.MSG_UPDATE_SUCCESS;
                }
                catch (Exception ex)
                {
                    Response.Write(ex.Message);
                }
                break;
            }
        }
예제 #6
0
        /// <summary>
        /// cmdDelete_Click runs when the Delete Button is clicked
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [cnurse]	9/28/2004	Updated to reflect design changes for Help, 508 support
        ///                       and localisation
        /// </history>
        protected void cmdDelete_Click(object sender, EventArgs e)
        {
            try
            {
                ModuleControlController objModuleControls = new ModuleControlController();

                if (!Null.IsNull(ModuleControlId))
                {
                    objModuleControls.DeleteModuleControl(ModuleControlId);
                }

                if (DesktopModuleId == -1)
                {
                    DesktopModuleId = -2;
                }
                Response.Redirect(EditUrl("desktopmoduleid", DesktopModuleId.ToString()), true);
            }
            catch (Exception exc)  //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
 private static void DeleteModuleControl(int controlId)
 {
     ModuleControlController.DeleteModuleControl(controlId);
 }