Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        private void QueryInterfaceDetailInfo(string id)
        {
            try
            {
                DataSet ds = InterfaceFunc.GetInstance().GetInterfaceFuncDetails(id);

                this.lblNameID.Text         = string.Format("{0}({1})", ds.Tables[0].Rows[0]["Name"].ToString().Trim(), ds.Tables[0].Rows[0]["FuncID"].ToString().Trim());
                this.lblID.Tag              = ds.Tables[0].Rows[0]["ID"].ToString().Trim();
                this.lblID.Text             = ds.Tables[0].Rows[0]["FuncID"].ToString().Trim();
                this.richTxtBoxDetails.Text = ds.Tables[0].Rows[0]["Details"].ToString().Trim();

                this.richTextBoxReturnValue.Clear();

                foreach (DataRow dr in ds.Tables[1].Rows)
                {
                    this.richTextBoxReturnValue.AppendText(dr["返回值说明"].ToString().Trim() + "\n");
                }

                this.c1FlexGridPara.DataSource = ds.Tables[2];

                this.c1FlexGridPara.Cols["ID"].Visible = false;

                this.c1FlexGridPara.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.RestrictCols;

                for (int i = this.c1FlexGridPara.Cols.Fixed; i <= this.c1FlexGridPara.Cols.Count - 1; i++)
                {
                    this.c1FlexGridPara.Cols[i].AllowMerging = true;
                }

                this.c1FlexGridPara.Cols["最大长度"].Width = 60;
                this.c1FlexGridPara.Cols["是否为空"].Width = 60;
                this.c1FlexGridPara.Cols["备注"].Width   = 220;

                if (ds.Tables.Count > 3)
                {
                    this.c1FlexGridDataset.DataSource = ds.Tables[3];

                    this.c1FlexGridDataset.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.RestrictCols;

                    for (int i = this.c1FlexGridDataset.Cols.Fixed; i <= this.c1FlexGridDataset.Cols.Count - 1; i++)
                    {
                        this.c1FlexGridDataset.Cols[i].AllowMerging = true;
                    }

                    this.c1FlexGridDataset.Cols["ID"].Visible = false;
                    this.c1FlexGridDataset.Cols["数据集"].Width  = 60;
                    this.c1FlexGridDataset.Cols["最大长度"].Width = 60;
                    this.c1FlexGridDataset.Cols["备注"].Width   = 320;
                }
            }
            catch (Exception e)
            {
                CommonFunctions.MsgError(e.Message);
            }
        }
Пример #2
0
        private void QueryFuncDetail(string id)
        {
            try
            {
                DataSet ds = InterfaceFunc.GetInstance().GetInterfaceFuncDetails(id);

                this.lblNameID.Text         = string.Format("{0}({1})", ds.Tables[0].Rows[0]["Name"].ToString().Trim(), ds.Tables[0].Rows[0]["FuncID"].ToString().Trim());
                this.lblID.Tag              = ds.Tables[0].Rows[0]["ID"].ToString().Trim();
                this.lblID.Text             = ds.Tables[0].Rows[0]["FuncID"].ToString().Trim();
                this.richTxtBoxDetails.Text = ds.Tables[0].Rows[0]["Details"].ToString().Trim();

                this.richTextBoxReturnValue.Clear();

                foreach (DataRow dr in ds.Tables[1].Rows)
                {
                    this.richTextBoxReturnValue.AppendText(dr["返回值说明"].ToString().Trim() + "\n");
                }

                this.c1FlexGridPara.DataSource = ds.Tables[2];

                this.c1FlexGridPara.Cols["ID"].Visible   = false;
                this.c1FlexGridPara.Cols["最大长度"].Visible = false;
                this.c1FlexGridPara.Cols["是否为空"].Visible = false;
                this.c1FlexGridPara.Cols["备注"].Visible   = false;

                this.interfacHNDataset.Clear();
                this.cBoxDataset.DataSource       = null;
                this.c1FlexGridDataset.DataSource = null;

                if (ds.Tables.Count > 3)
                {
                    if (this.interfacHNDataset.Rows.Count > 0)
                    {
                        this.interfacHNDataset.Clear();
                    }
                    this.interfacHNDataset = ds.Tables[3];
                }

                if (ds.Tables.Count > 4)
                {
                    this.cBoxDataset.DataSource = ds.Tables[4];

                    this.cBoxDataset.DisplayMember = "Name";
                    this.cBoxDataset.ValueMember   = "Name";
                }
            }
            catch (Exception e)
            {
                CommonFunctions.MsgError(e.Message);
            }
        }
Пример #3
0
        /// <summary>
        /// 查询接口功能
        /// </summary>
        /// <param name="id">编码</param>
        /// <param name="name">名称</param>
        /// <param name="fuzzy">是否模糊查询</param>
        private void QueryInterfaceFunc(string funcID, string name, bool fuzzy)
        {
            try
            {
                this.c1FlexGridFunc.DataSource = InterfaceFunc.GetInstance().GetInterfaceFunc(funcID, name, fuzzy).Tables[0];

                this.c1FlexGridFunc.Cols[1].Visible = false;
                this.c1FlexGridFunc.Cols[2].Width   = 100;
                this.c1FlexGridFunc.Cols[3].Width   = 240;
            }
            catch (Exception e)
            {
                CommonFunctions.MsgError(e.Message);
            }
        }