Ejemplo n.º 1
0
        public IActionResult GetSqlTableDetails(string TableName, string ProcName)
        {
            DynamicParameters     dy           = new DynamicParameters();
            DataTable             TableDetails = new DataTable();
            List <ModelEntityDto> list         = new List <ModelEntityDto>();

            if (TableName != "RPG_Proc_Report")
            {
                dy.Add("TableName", TableName);
                TableDetails = DapperHelper.ExcuteProduce("TableDetails", dy);
            }
            else
            {
                dy.Add("TableName", ProcName);
                TableDetails = DapperHelper.ExcuteProduce("GetProcDetails", dy);

                ModelEntityDto modelEntity = new ModelEntityDto();
                //序号
                modelEntity.txt_Number = 1;
                //列名
                modelEntity.columnName = ProcName;
                //默认值
                modelEntity.defaultValue = ProcName;
                //显示名称
                modelEntity.displayShowName = "存储过程名称";
                //是否下拉框
                modelEntity.isCombobox = "N";
                //是否禁用
                modelEntity.isDisable = "N";
                //是否必填
                modelEntity.isRequest = "N";
                //跨行
                modelEntity.columnSpan = 1;
                //隐藏显示
                modelEntity.isShow = "Y";
                list.Add(modelEntity);
            }

            foreach (DataRow item in TableDetails.Rows)
            {
                ModelEntityDto modelEntity = new ModelEntityDto();
                //序号
                modelEntity.txt_Number = (list.Count + 1);
                //列名
                modelEntity.columnName = item[1].ToString();
                //默认值
                modelEntity.defaultValue = (string)item[2];
                //显示名称
                modelEntity.displayShowName = (string)item[3];
                //是否下拉框
                modelEntity.isCombobox = "N";
                //是否禁用
                modelEntity.isDisable = "N";
                //是否必填
                modelEntity.isRequest = "N";
                //跨行
                modelEntity.columnSpan = 1;
                //隐藏显示
                modelEntity.isShow = "Y";
                list.Add(modelEntity);
            }
            return(Json(list));
        }
Ejemplo n.º 2
0
        public IActionResult Edit(string Query)
        {
            ModelEntityDto entityDto = JsonConvert.DeserializeObject <ModelEntityDto>(Query);

            return(View(entityDto));
        }