Exemplo n.º 1
0
        public override ConsoleReturnVo Execute(string[] cmd)
        {
            ConsoleReturnVo result = base.Execute(cmd);

            if (cmd.Length > 1)
            {
                if (cmd[1] == ConfigurationManager.AppSettings[@"bigpointpass"])
                {
                    if ((Controller as ProjectsController).IsBigpointPassSet && !(Controller as ProjectsController).IsBigpoint)
                    {
                        Controller.Session[ProjectsController.BIGPOINT] = true;
                        result.ToAction = "AS3TOCS";
                        result.Message += "\nWelcome Bigpoint employee. Now you can use AS3TOCS.\nYou are now being redirected to AS3TOCS...";
                        return(result);
                    }
                    else
                    {
                        result.Message += "\nYou are already authorized...";
                        return(result);
                    }
                }
                else
                {
                    result.Message += "\nUnknown password...";
                    return(result);
                }
            }
            else
            {
                result.Message += "\nEmpty password...";
                return(result);
            }
        }
Exemplo n.º 2
0
        public override ConsoleReturnVo Execute(string[] cmd)
        {
            ConsoleReturnVo result = base.Execute(cmd);

            attribuesList.ForEach(x => result.Message += "\n" + x.ToString());
            return(result);
        }
Exemplo n.º 3
0
        public JsonResult GenericProcessCommand(string cmd, bool?tab)
        {
            ConsoleReturnVo result = Controllers.Console.ConsoleCommandParser.Parse(cmd, tab, this);

            if (!string.IsNullOrEmpty(result.Message))
            {
                Session[CONSOLE] += result.Message;
            }

            return(Json(result.ToObject()));
        }
Exemplo n.º 4
0
        public override ConsoleReturnVo Execute(string[] cmd)
        {
            ConsoleReturnVo result = base.Execute(cmd);

            if (cmd.Length > 1)
            {
                switch (cmd[1])
                {
                case "data":
                    if (cmd.Length > 2)
                    {
                        switch (cmd[2])
                        {
                        case "clear":
                            if (cmd.Length > 3)
                            {
                                result.Message += "Not implemented yet...";
                            }
                            else
                            {
                                db.Database.ExecuteSqlCommand("delete from Data");
                                result.Message += "Cleared: " + cmd[1];
                            }
                            break;

                        default:
                            result.Message += "db error: " + 101;
                            break;
                        }
                    }
                    else
                    {
                        IEnumerable <Data> dbresult = db.DataCollections;
                        foreach (Data d in dbresult)
                        {
                            result.Message += d.ToString() + "\n----------------------------------------\n";
                        }
                    }
                    break;

                default:
                    result.Message += "db error: " + 100;
                    break;
                }
            }
            else
            {
                result.Message += "This command needs params";
            }

            return(result);
        }
Exemplo n.º 5
0
        public override ConsoleReturnVo Execute(string[] cmd)
        {
            ConsoleReturnVo result = base.Execute(cmd);

            if (cmd.Length > 1)
            {
                result.Message = "\n" + CalculateMD5Hash(cmd[1]);
            }
            else
            {
                result.Message += "\nEmpty string...";
                return(result);
            }

            return(result);
        }