deleteProcess() public method

public deleteProcess ( int P_ProcessId, bool deleteDBEntries ) : string
P_ProcessId int
deleteDBEntries bool
return string
        public ActionResult DeleteFull(int ProcessId, int ProjectFilter)
        {
            try
            {
                string wfmBaseAddress = ConfigurationSettings.AppSettings["wfmBaseAddress"].ToString();
                string wfmUsername = ConfigurationSettings.AppSettings["wfmUsername"].ToString();
                string wfmPassword = ConfigurationSettings.AppSettings["wfmPassword"].ToString();
                string sqlConnectionString = ConfigurationSettings.AppSettings["repositoryConnectionString"].ToString();


                InFlowWFM wfm = new InFlowWFM(wfmBaseAddress, wfmUsername, wfmPassword, sqlConnectionString);

                wfm.deleteProcess(ProcessId, true);

                return RedirectToAction("Index", new { projectId = ProjectFilter });
            }
            catch (Exception e)
            {
                ViewBag.Error = e.Message;
                while (e.InnerException != null)
                {
                    e = e.InnerException;
                    ViewBag.Error = ViewBag.Error + e.Message;
                }
                return View("Error");
            }
        }
Exemplo n.º 2
0
        static void cleanScope()
        {
            InFlowWFM wfm = new InFlowWFM(cfgWFMBaseAddress, cfgWFMUsername, cfgWFMPassword, cfgSQLConnectionString_InFlow);

            

            string input = "...";

            do
            {
                DConsole.PrintEmptyLines();
                DConsole.Print("ProcessName:");
                input = Console.ReadLine();
                if(input.Length > 0)
                    DConsole.Print(wfm.deleteProcess(ScopeName, input));
                if (input.Length <= 0)
                    DConsole.Print(wfm.deleteCompanyScope(ScopeName));

                DConsole.PrintDone(); Console.WriteLine();

            } while (input.Length > 0);

            start();
        }