Exemple #1
0
        private void ProcessGridSelect(JsonApplication jsonApplicationOut)
        {
            GridData gridData = jsonApplicationOut.GridData;

            foreach (GridLoad gridLoad in gridData.GridLoadList.Values)
            {
                string gridName = gridLoad.GridName;
                foreach (GridRow gridRow in gridData.RowList[gridName])
                {
                    if (gridRow.IsClick)
                    {
                        ProcessGridSelectRowClear(jsonApplicationOut);
                        gridRow.IsSelectSet(true);
                    }
                    foreach (var gridColumn in gridData.ColumnList[gridName])
                    {
                        GridCell gridCell = gridData.CellList[gridName][gridColumn.FieldName][gridRow.Index];
                        if (gridCell.IsClick == true)
                        {
                            ProcessGridSelectCell(jsonApplicationOut, gridName, gridRow.Index, gridColumn.FieldName);
                        }
                    }
                }
            }
        }
Exemple #2
0
        private void ProcessGridSelectCell(JsonApplication jsonApplicationOut, string gridName, string index, string fieldName)
        {
            GridData gridData = jsonApplicationOut.GridData;

            gridData.FocusGridName  = gridName;
            gridData.FocusIndex     = index;
            gridData.FocusFieldName = fieldName;
            ProcessGridSelectCellClear(jsonApplicationOut);
            gridData.CellList[gridName][fieldName][index].IsSelect = true;
        }
Exemple #3
0
 private void ProcessGridSelectRowClear(JsonApplication jsonApplicationOut)
 {
     foreach (string gridName in jsonApplicationOut.GridData.RowList.Keys)
     {
         foreach (GridRow gridRow in jsonApplicationOut.GridData.RowList[gridName])
         {
             gridRow.IsSelectSet(false);
         }
     }
 }
Exemple #4
0
        private void ProcessGridSelectCellClear(JsonApplication jsonApplicationOut)
        {
            GridData gridData = jsonApplicationOut.GridData;

            foreach (string gridName in gridData.RowList.Keys)
            {
                foreach (GridRow gridRow in gridData.RowList[gridName])
                {
                    foreach (var gridColumn in gridData.ColumnList[gridName])
                    {
                        GridCell gridCell = gridData.CellList[gridName][gridColumn.FieldName][gridRow.Index];
                        gridCell.IsSelect = false;
                    }
                }
            }
        }
Exemple #5
0
        private void ProcessGridIsClickReset(JsonApplication jsonApplicationOut)
        {
            GridData gridData = jsonApplicationOut.GridData;

            foreach (GridLoad gridLoad in gridData.GridLoadList.Values)
            {
                string gridName = gridLoad.GridName;
                foreach (GridRow gridRow in gridData.RowList[gridName])
                {
                    gridRow.IsClick = false;
                    foreach (var gridColumn in gridData.ColumnList[gridName])
                    {
                        GridCell gridCell = gridData.CellList[gridName][gridColumn.FieldName][gridRow.Index];
                        gridCell.IsClick = false;
                    }
                }
            }
        }
Exemple #6
0
        public JsonApplication Process(JsonApplication jsonApplicationIn, string requestPath)
        {
            JsonApplication jsonApplicationOut = Framework.Server.DataAccessLayer.Util.JsonObjectClone <JsonApplication>(jsonApplicationIn);

            if (jsonApplicationOut == null || jsonApplicationOut.Session == Guid.Empty)
            {
                jsonApplicationOut = JsonApplicationCreate();
            }
            else
            {
                jsonApplicationOut.ResponseCount += 1;
            }
            ProcessGridSelect(jsonApplicationOut);
            ProcessGridIsClick(jsonApplicationOut);
            ProcessGridIsClickReset(jsonApplicationOut);
            jsonApplicationOut.Name          = ".NET Core=" + DateTime.Now.ToString("HH:mm:ss.fff");
            jsonApplicationOut.VersionServer = Framework.Util.VersionServer;
            return(jsonApplicationOut);
        }
Exemple #7
0
        protected virtual JsonApplication JsonApplicationCreate()
        {
            JsonApplication result = new JsonApplication();

            result.Session = Guid.NewGuid();
            //
            var container    = new LayoutContainer(result, "Container");
            var rowHeader    = new LayoutRow(container, "Header");
            var cellHeader1  = new LayoutCell(rowHeader, "HeaderCell1");
            var rowContent   = new LayoutRow(container, "Content");
            var cellContent1 = new LayoutCell(rowContent, "ContentCell1");
            var cellContent2 = new LayoutCell(rowContent, "ContentCell2");

            new Label(cellContent2, "Enter text");
            new Input(cellContent2, "MyTest");
            var rowFooter   = new LayoutRow(container, "Footer");
            var cellFooter1 = new LayoutCell(rowFooter, "FooterCell1");
            var button      = new Button(cellFooter1, "Hello");

            //
            return(result);
        }
Exemple #8
0
 protected virtual void ProcessGridIsClick(JsonApplication jsonApplicationOut)
 {
 }