Exemple #1
0
        public static void CreateRowConf(string tableGuid, string tableName, string file, CCTableFlags.ConfType type)
        {
            string newPath;

            if (type == CCTableFlags.ConfType.File)
            {
                newPath = $"{Parameter.RepoDirs}/FILE{file.Replace("/", "_")}";
            }
            else
            {
                newPath = $"{Parameter.RepoDirs}/DIR{file.Replace("/", "_")}";
            }
            var model = new CCTableRowModel {
                _Id       = Guid.NewGuid().ToString(),
                Guid      = Guid.NewGuid().ToString(),
                NUid      = Guid.NewGuid().ToString().Substring(0, 8),
                TableGuid = tableGuid,
                File      = newPath,
                ConfType  = type
            };

            DeNSo.Session.New.Set(model);
            if (type == CCTableFlags.ConfType.File)
            {
                SetConfFile(file, newPath);
            }
            else
            {
                SetConfDirectory(file, newPath);
            }
        }
Exemple #2
0
        public static void CreateRowForTextInputCommand(string tableGuid, string tableName, string label,
                                                        string inputLabel, string inputCommandSet, string inputCommandGet, string notes, CCTableFlags.OsiLevel flagOsi, CCTableFlags.CommandFunction flagFunction, string inputId, string inputLocation)
        {
            var model = new CCTableRowModel {
                _Id                  = Guid.NewGuid().ToString(),
                Guid                 = Guid.NewGuid().ToString(),
                NUid                 = Guid.NewGuid().ToString().Substring(0, 8),
                TableGuid            = tableGuid,
                Label                = label,
                InputType            = "text",
                InputLabel           = inputLabel,
                CommandSet           = inputCommandSet,
                CommandGet           = inputCommandGet,
                CommandType          = CCTableCommandType.TextInput,
                Notes                = notes,
                FlagOsi              = flagOsi,
                FlagCommandFunction  = flagFunction,
                CommandInputId       = inputId,
                CommandInputLocation = inputLocation
            };

            model.HtmlInputId  = "New" + tableName.UppercaseAllFirstLetters().RemoveWhiteSpace() + model.Label.UppercaseAllFirstLetters().RemoveWhiteSpace();
            model.HtmlSumbitId = "Update" + tableName.UppercaseAllFirstLetters().RemoveWhiteSpace() + model.Label.UppercaseAllFirstLetters().RemoveWhiteSpace();
            DeNSo.Session.New.Set(model);
        }
Exemple #3
0
        public static void CreateRowDataView(string tableGuid, string tableName, string label, string inputCommand, string result)
        {
            var model = new CCTableRowModel {
                _Id              = Guid.NewGuid().ToString(),
                Guid             = Guid.NewGuid().ToString(),
                NUid             = Guid.NewGuid().ToString().Substring(0, 8),
                TableGuid        = tableGuid,
                Label            = label,
                InputCommand     = inputCommand,
                ValueResult      = result,
                MapRules         = new List <CCTableRowMap>(),
                HasMap           = false,
                ValueResultArray = result.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).ToArray()
            };

            model.HtmlInputId  = "New" + tableName.UppercaseAllFirstLetters().RemoveWhiteSpace() + model.Label.UppercaseAllFirstLetters().RemoveWhiteSpace();
            model.HtmlSumbitId = "Update" + tableName.UppercaseAllFirstLetters().RemoveWhiteSpace() + model.Label.UppercaseAllFirstLetters().RemoveWhiteSpace();
            DeNSo.Session.New.Set(model);
        }
Exemple #4
0
            public static void CreateRowForDirectCommand(string tableName, string label, string inputLabel, string command, string notes, string inputId, string inputLocation)
            {
                var model = new CCTableRowModel {
                    _Id                  = Guid.NewGuid().ToString(),
                    Guid                 = Guid.NewGuid().ToString(),
                    NUid                 = Guid.NewGuid().ToString().Substring(0, 8),
                    TableGuid            = tableName,
                    Label                = label,
                    InputType            = "hidden",
                    InputLabel           = inputLabel,
                    CommandDirect        = command,
                    CommandType          = CCTableCommandType.Direct,
                    Notes                = notes,
                    CommandInputId       = inputId,
                    CommandInputLocation = inputLocation
                };

                model.HtmlInputId  = "New" + tableName.UppercaseAllFirstLetters().RemoveWhiteSpace() + model.Label.UppercaseAllFirstLetters().RemoveWhiteSpace();
                model.HtmlSumbitId = "Update" + tableName.UppercaseAllFirstLetters().RemoveWhiteSpace() + model.Label.UppercaseAllFirstLetters().RemoveWhiteSpace();
                DeNSo.Session.New.Set(model);
            }