Joey 4 dní pred
rodič
commit
852774ef1d
3 zmenil súbory, kde vykonal 556 pridanie a 149 odobranie
  1. 6 0
      DDQ.Designer.cs
  2. 320 136
      FundQ.Designer.cs
  3. 230 13
      FundQ.cs

+ 6 - 0
DDQ.Designer.cs

@@ -117,6 +117,7 @@
             this.dataGridView1.AllowUserToAddRows = false;
             this.dataGridView1.AllowUserToDeleteRows = false;
             this.dataGridView1.AllowUserToOrderColumns = true;
+            this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;
             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dataGridView1.Location = new System.Drawing.Point(0, 0);
@@ -140,6 +141,8 @@
             // 
             // cmbRequestAction
             // 
+            this.cmbRequestAction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.cmbRequestAction.FormattingEnabled = true;
             this.cmbRequestAction.Location = new System.Drawing.Point(594, 13);
             this.cmbRequestAction.Name = "cmbRequestAction";
@@ -228,6 +231,7 @@
             this.grdFundList.AllowUserToAddRows = false;
             this.grdFundList.AllowUserToDeleteRows = false;
             this.grdFundList.AllowUserToOrderColumns = true;
+            this.grdFundList.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;
             this.grdFundList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.grdFundList.Dock = System.Windows.Forms.DockStyle.Fill;
             this.grdFundList.Location = new System.Drawing.Point(0, 0);
@@ -252,6 +256,8 @@
             // 
             // cmbFundCategory
             // 
+            this.cmbFundCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.cmbFundCategory.FormattingEnabled = true;
             this.cmbFundCategory.Location = new System.Drawing.Point(562, 18);
             this.cmbFundCategory.Name = "cmbFundCategory";

+ 320 - 136
FundQ.Designer.cs

@@ -36,8 +36,19 @@
             this.lblFundName = new System.Windows.Forms.Label();
             this.tbcFund = new System.Windows.Forms.TabControl();
             this.tabGeneralInfo = new System.Windows.Forms.TabPage();
+            this.panGeneralInfoMain = new System.Windows.Forms.Panel();
+            this.txtPolicyOfClosingFund = new System.Windows.Forms.TextBox();
+            this.label14 = new System.Windows.Forms.Label();
             this.grdTER = new System.Windows.Forms.DataGridView();
             this.grbFees = new System.Windows.Forms.GroupBox();
+            this.txtTrusteeFee = new System.Windows.Forms.TextBox();
+            this.label11 = new System.Windows.Forms.Label();
+            this.txtPerformanceFee = new System.Windows.Forms.TextBox();
+            this.label12 = new System.Windows.Forms.Label();
+            this.txtSwitchingFee = new System.Windows.Forms.TextBox();
+            this.label13 = new System.Windows.Forms.Label();
+            this.txtAdministrationFee = new System.Windows.Forms.TextBox();
+            this.label9 = new System.Windows.Forms.Label();
             this.txtSubscriptionFee = new System.Windows.Forms.TextBox();
             this.label8 = new System.Windows.Forms.Label();
             this.txtRedemptionFee = new System.Windows.Forms.TextBox();
@@ -53,33 +64,39 @@
             this.label2 = new System.Windows.Forms.Label();
             this.txtInvestmentObjective = new System.Windows.Forms.TextBox();
             this.label1 = new System.Windows.Forms.Label();
+            this.btnSaveGeneralInfo = new System.Windows.Forms.Button();
             this.tabProcess = new System.Windows.Forms.TabPage();
+            this.panel2 = new System.Windows.Forms.Panel();
+            this.chkDerivatesForLeverage = new System.Windows.Forms.CheckBox();
+            this.chkDerivativesForMarket = new System.Windows.Forms.CheckBox();
+            this.chkDerivatesForHedging = new System.Windows.Forms.CheckBox();
+            this.chkDerivativesForEfficent = new System.Windows.Forms.CheckBox();
+            this.label15 = new System.Windows.Forms.Label();
+            this.chkUseDerivatives = new System.Windows.Forms.CheckBox();
+            this.chkAllowDerivatives = new System.Windows.Forms.CheckBox();
+            this.btnUploadProcessDiagram = new System.Windows.Forms.Button();
+            this.btnDeleteProcessDiagram = new System.Windows.Forms.Button();
+            this.picFundProcess = new System.Windows.Forms.PictureBox();
+            this.label10 = new System.Windows.Forms.Label();
             this.tabRisk = new System.Windows.Forms.TabPage();
             this.tabOwnership = new System.Windows.Forms.TabPage();
             this.tabPerformance = new System.Windows.Forms.TabPage();
-            this.txtAdministrationFee = new System.Windows.Forms.TextBox();
-            this.label9 = new System.Windows.Forms.Label();
-            this.txtTrusteeFee = new System.Windows.Forms.TextBox();
-            this.label11 = new System.Windows.Forms.Label();
-            this.txtPerformanceFee = new System.Windows.Forms.TextBox();
-            this.label12 = new System.Windows.Forms.Label();
-            this.txtSwitchingFee = new System.Windows.Forms.TextBox();
-            this.label13 = new System.Windows.Forms.Label();
-            this.label14 = new System.Windows.Forms.Label();
-            this.txtPolicyOfClosingFund = new System.Windows.Forms.TextBox();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.btnSaveGeneralInfo = new System.Windows.Forms.Button();
+            this.label16 = new System.Windows.Forms.Label();
             this.panStaticData.SuspendLayout();
             this.tbcFund.SuspendLayout();
             this.tabGeneralInfo.SuspendLayout();
+            this.panGeneralInfoMain.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdTER)).BeginInit();
             this.grbFees.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdPortfolioManager)).BeginInit();
-            this.panel1.SuspendLayout();
+            this.tabProcess.SuspendLayout();
+            this.panel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.picFundProcess)).BeginInit();
             this.SuspendLayout();
             // 
             // panStaticData
             // 
+            this.panStaticData.Controls.Add(this.btnSaveGeneralInfo);
             this.panStaticData.Controls.Add(this.lblDomicile);
             this.panStaticData.Controls.Add(this.lblInceptionDate);
             this.panStaticData.Controls.Add(this.lblCategory);
@@ -157,20 +174,7 @@
             // tabGeneralInfo
             // 
             this.tabGeneralInfo.AutoScroll = true;
-            this.tabGeneralInfo.Controls.Add(this.panel1);
-            this.tabGeneralInfo.Controls.Add(this.txtPolicyOfClosingFund);
-            this.tabGeneralInfo.Controls.Add(this.label14);
-            this.tabGeneralInfo.Controls.Add(this.grdTER);
-            this.tabGeneralInfo.Controls.Add(this.grbFees);
-            this.tabGeneralInfo.Controls.Add(this.label5);
-            this.tabGeneralInfo.Controls.Add(this.grdPortfolioManager);
-            this.tabGeneralInfo.Controls.Add(this.label4);
-            this.tabGeneralInfo.Controls.Add(this.txtInvestmentPhilosophy);
-            this.tabGeneralInfo.Controls.Add(this.txtBenchmark);
-            this.tabGeneralInfo.Controls.Add(this.label3);
-            this.tabGeneralInfo.Controls.Add(this.label2);
-            this.tabGeneralInfo.Controls.Add(this.txtInvestmentObjective);
-            this.tabGeneralInfo.Controls.Add(this.label1);
+            this.tabGeneralInfo.Controls.Add(this.panGeneralInfoMain);
             this.tabGeneralInfo.Location = new System.Drawing.Point(4, 27);
             this.tabGeneralInfo.Name = "tabGeneralInfo";
             this.tabGeneralInfo.Padding = new System.Windows.Forms.Padding(3);
@@ -179,16 +183,61 @@
             this.tabGeneralInfo.Text = "General Info";
             this.tabGeneralInfo.UseVisualStyleBackColor = true;
             // 
+            // panGeneralInfoMain
+            // 
+            this.panGeneralInfoMain.AutoScroll = true;
+            this.panGeneralInfoMain.BackColor = System.Drawing.Color.Transparent;
+            this.panGeneralInfoMain.Controls.Add(this.label16);
+            this.panGeneralInfoMain.Controls.Add(this.txtPolicyOfClosingFund);
+            this.panGeneralInfoMain.Controls.Add(this.label14);
+            this.panGeneralInfoMain.Controls.Add(this.grdTER);
+            this.panGeneralInfoMain.Controls.Add(this.grbFees);
+            this.panGeneralInfoMain.Controls.Add(this.label5);
+            this.panGeneralInfoMain.Controls.Add(this.grdPortfolioManager);
+            this.panGeneralInfoMain.Controls.Add(this.label4);
+            this.panGeneralInfoMain.Controls.Add(this.txtInvestmentPhilosophy);
+            this.panGeneralInfoMain.Controls.Add(this.txtBenchmark);
+            this.panGeneralInfoMain.Controls.Add(this.label3);
+            this.panGeneralInfoMain.Controls.Add(this.label2);
+            this.panGeneralInfoMain.Controls.Add(this.txtInvestmentObjective);
+            this.panGeneralInfoMain.Controls.Add(this.label1);
+            this.panGeneralInfoMain.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panGeneralInfoMain.Location = new System.Drawing.Point(3, 3);
+            this.panGeneralInfoMain.Name = "panGeneralInfoMain";
+            this.panGeneralInfoMain.Size = new System.Drawing.Size(1053, 562);
+            this.panGeneralInfoMain.TabIndex = 14;
+            // 
+            // txtPolicyOfClosingFund
+            // 
+            this.txtPolicyOfClosingFund.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtPolicyOfClosingFund.Location = new System.Drawing.Point(24, 779);
+            this.txtPolicyOfClosingFund.Multiline = true;
+            this.txtPolicyOfClosingFund.Name = "txtPolicyOfClosingFund";
+            this.txtPolicyOfClosingFund.Size = new System.Drawing.Size(673, 124);
+            this.txtPolicyOfClosingFund.TabIndex = 12;
+            // 
+            // label14
+            // 
+            this.label14.AutoSize = true;
+            this.label14.Location = new System.Drawing.Point(21, 757);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(143, 18);
+            this.label14.TabIndex = 11;
+            this.label14.Text = "Policy of Closing Fund";
+            // 
             // grdTER
             // 
             this.grdTER.AllowUserToAddRows = false;
             this.grdTER.AllowUserToDeleteRows = false;
+            this.grdTER.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
             this.grdTER.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.grdTER.Location = new System.Drawing.Point(24, 532);
             this.grdTER.Name = "grdTER";
             this.grdTER.RowTemplate.Height = 23;
             this.grdTER.Size = new System.Drawing.Size(340, 210);
             this.grdTER.TabIndex = 10;
+            this.grdTER.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.grdTER_CellValidating);
             // 
             // grbFees
             // 
@@ -210,11 +259,76 @@
             this.grbFees.Controls.Add(this.label6);
             this.grbFees.Location = new System.Drawing.Point(370, 524);
             this.grbFees.Name = "grbFees";
-            this.grbFees.Size = new System.Drawing.Size(661, 218);
+            this.grbFees.Size = new System.Drawing.Size(644, 218);
             this.grbFees.TabIndex = 9;
             this.grbFees.TabStop = false;
             this.grbFees.Text = "Current Fees";
             // 
+            // txtTrusteeFee
+            // 
+            this.txtTrusteeFee.Location = new System.Drawing.Point(469, 90);
+            this.txtTrusteeFee.Name = "txtTrusteeFee";
+            this.txtTrusteeFee.Size = new System.Drawing.Size(100, 26);
+            this.txtTrusteeFee.TabIndex = 11;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Location = new System.Drawing.Point(342, 93);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(80, 18);
+            this.label11.TabIndex = 10;
+            this.label11.Text = "Trustee Fee";
+            // 
+            // txtPerformanceFee
+            // 
+            this.txtPerformanceFee.Location = new System.Drawing.Point(150, 126);
+            this.txtPerformanceFee.Multiline = true;
+            this.txtPerformanceFee.Name = "txtPerformanceFee";
+            this.txtPerformanceFee.Size = new System.Drawing.Size(419, 77);
+            this.txtPerformanceFee.TabIndex = 13;
+            // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Location = new System.Drawing.Point(23, 129);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(114, 18);
+            this.label12.TabIndex = 12;
+            this.label12.Text = "Performance Fee";
+            // 
+            // txtSwitchingFee
+            // 
+            this.txtSwitchingFee.Location = new System.Drawing.Point(150, 90);
+            this.txtSwitchingFee.Name = "txtSwitchingFee";
+            this.txtSwitchingFee.Size = new System.Drawing.Size(100, 26);
+            this.txtSwitchingFee.TabIndex = 9;
+            // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Location = new System.Drawing.Point(23, 93);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(94, 18);
+            this.label13.TabIndex = 8;
+            this.label13.Text = "Switching Fee";
+            // 
+            // txtAdministrationFee
+            // 
+            this.txtAdministrationFee.Location = new System.Drawing.Point(469, 58);
+            this.txtAdministrationFee.Name = "txtAdministrationFee";
+            this.txtAdministrationFee.Size = new System.Drawing.Size(100, 26);
+            this.txtAdministrationFee.TabIndex = 7;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Location = new System.Drawing.Point(342, 61);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(126, 18);
+            this.label9.TabIndex = 6;
+            this.label9.Text = "Administration Fee";
+            // 
             // txtSubscriptionFee
             // 
             this.txtSubscriptionFee.Location = new System.Drawing.Point(469, 22);
@@ -276,11 +390,12 @@
             // 
             this.grdPortfolioManager.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdPortfolioManager.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
             this.grdPortfolioManager.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.grdPortfolioManager.Location = new System.Drawing.Point(24, 398);
             this.grdPortfolioManager.Name = "grdPortfolioManager";
             this.grdPortfolioManager.RowTemplate.Height = 23;
-            this.grdPortfolioManager.Size = new System.Drawing.Size(1007, 85);
+            this.grdPortfolioManager.Size = new System.Drawing.Size(990, 85);
             this.grdPortfolioManager.TabIndex = 7;
             // 
             // label4
@@ -299,7 +414,7 @@
             this.txtInvestmentPhilosophy.Location = new System.Drawing.Point(24, 255);
             this.txtInvestmentPhilosophy.Multiline = true;
             this.txtInvestmentPhilosophy.Name = "txtInvestmentPhilosophy";
-            this.txtInvestmentPhilosophy.Size = new System.Drawing.Size(1007, 95);
+            this.txtInvestmentPhilosophy.Size = new System.Drawing.Size(990, 95);
             this.txtInvestmentPhilosophy.TabIndex = 5;
             // 
             // txtBenchmark
@@ -308,7 +423,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.txtBenchmark.Location = new System.Drawing.Point(24, 179);
             this.txtBenchmark.Name = "txtBenchmark";
-            this.txtBenchmark.Size = new System.Drawing.Size(1007, 26);
+            this.txtBenchmark.Size = new System.Drawing.Size(990, 26);
             this.txtBenchmark.TabIndex = 4;
             // 
             // label3
@@ -336,7 +451,7 @@
             this.txtInvestmentObjective.Location = new System.Drawing.Point(24, 39);
             this.txtInvestmentObjective.Multiline = true;
             this.txtInvestmentObjective.Name = "txtInvestmentObjective";
-            this.txtInvestmentObjective.Size = new System.Drawing.Size(1007, 95);
+            this.txtInvestmentObjective.Size = new System.Drawing.Size(990, 95);
             this.txtInvestmentObjective.TabIndex = 1;
             // 
             // label1
@@ -348,8 +463,22 @@
             this.label1.TabIndex = 0;
             this.label1.Text = "Investment Objective";
             // 
+            // btnSaveGeneralInfo
+            // 
+            this.btnSaveGeneralInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnSaveGeneralInfo.Location = new System.Drawing.Point(980, 39);
+            this.btnSaveGeneralInfo.Name = "btnSaveGeneralInfo";
+            this.btnSaveGeneralInfo.Size = new System.Drawing.Size(75, 28);
+            this.btnSaveGeneralInfo.TabIndex = 0;
+            this.btnSaveGeneralInfo.Text = "Save";
+            this.btnSaveGeneralInfo.UseVisualStyleBackColor = true;
+            this.btnSaveGeneralInfo.Click += new System.EventHandler(this.btnSaveGeneralInfo_Click);
+            // 
             // tabProcess
             // 
+            this.tabProcess.AutoScroll = true;
+            this.tabProcess.Controls.Add(this.panel2);
             this.tabProcess.Location = new System.Drawing.Point(4, 27);
             this.tabProcess.Name = "tabProcess";
             this.tabProcess.Padding = new System.Windows.Forms.Padding(3);
@@ -358,6 +487,139 @@
             this.tabProcess.Text = "Process";
             this.tabProcess.UseVisualStyleBackColor = true;
             // 
+            // panel2
+            // 
+            this.panel2.AutoScroll = true;
+            this.panel2.Controls.Add(this.chkDerivatesForLeverage);
+            this.panel2.Controls.Add(this.chkDerivativesForMarket);
+            this.panel2.Controls.Add(this.chkDerivatesForHedging);
+            this.panel2.Controls.Add(this.chkDerivativesForEfficent);
+            this.panel2.Controls.Add(this.label15);
+            this.panel2.Controls.Add(this.chkUseDerivatives);
+            this.panel2.Controls.Add(this.chkAllowDerivatives);
+            this.panel2.Controls.Add(this.btnUploadProcessDiagram);
+            this.panel2.Controls.Add(this.btnDeleteProcessDiagram);
+            this.panel2.Controls.Add(this.picFundProcess);
+            this.panel2.Controls.Add(this.label10);
+            this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel2.Location = new System.Drawing.Point(3, 3);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(1053, 562);
+            this.panel2.TabIndex = 0;
+            // 
+            // chkDerivatesForLeverage
+            // 
+            this.chkDerivatesForLeverage.AutoSize = true;
+            this.chkDerivatesForLeverage.Location = new System.Drawing.Point(257, 471);
+            this.chkDerivatesForLeverage.Name = "chkDerivatesForLeverage";
+            this.chkDerivatesForLeverage.Size = new System.Drawing.Size(194, 22);
+            this.chkDerivatesForLeverage.TabIndex = 11;
+            this.chkDerivatesForLeverage.Text = "Active allocation / leverage";
+            this.chkDerivatesForLeverage.UseVisualStyleBackColor = true;
+            // 
+            // chkDerivativesForMarket
+            // 
+            this.chkDerivativesForMarket.AutoSize = true;
+            this.chkDerivativesForMarket.Location = new System.Drawing.Point(257, 443);
+            this.chkDerivativesForMarket.Name = "chkDerivativesForMarket";
+            this.chkDerivativesForMarket.Size = new System.Drawing.Size(113, 22);
+            this.chkDerivativesForMarket.TabIndex = 10;
+            this.chkDerivativesForMarket.Text = "Market access";
+            this.chkDerivativesForMarket.UseVisualStyleBackColor = true;
+            // 
+            // chkDerivatesForHedging
+            // 
+            this.chkDerivatesForHedging.AutoSize = true;
+            this.chkDerivatesForHedging.Location = new System.Drawing.Point(257, 415);
+            this.chkDerivatesForHedging.Name = "chkDerivatesForHedging";
+            this.chkDerivatesForHedging.Size = new System.Drawing.Size(78, 22);
+            this.chkDerivatesForHedging.TabIndex = 9;
+            this.chkDerivatesForHedging.Text = "Hedging";
+            this.chkDerivatesForHedging.UseVisualStyleBackColor = true;
+            // 
+            // chkDerivativesForEfficent
+            // 
+            this.chkDerivativesForEfficent.AutoSize = true;
+            this.chkDerivativesForEfficent.Location = new System.Drawing.Point(257, 387);
+            this.chkDerivativesForEfficent.Name = "chkDerivativesForEfficent";
+            this.chkDerivativesForEfficent.Size = new System.Drawing.Size(219, 22);
+            this.chkDerivativesForEfficent.TabIndex = 8;
+            this.chkDerivativesForEfficent.Text = "Efficient portfolio management";
+            this.chkDerivativesForEfficent.UseVisualStyleBackColor = true;
+            // 
+            // label15
+            // 
+            this.label15.AutoSize = true;
+            this.label15.Location = new System.Drawing.Point(15, 386);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(224, 18);
+            this.label15.TabIndex = 7;
+            this.label15.Text = "The purpose to use derivatives are:";
+            // 
+            // chkUseDerivatives
+            // 
+            this.chkUseDerivatives.AutoSize = true;
+            this.chkUseDerivatives.Location = new System.Drawing.Point(18, 346);
+            this.chkUseDerivatives.Name = "chkUseDerivatives";
+            this.chkUseDerivatives.Size = new System.Drawing.Size(319, 22);
+            this.chkUseDerivatives.TabIndex = 6;
+            this.chkUseDerivatives.Text = "Does the fund actually use derivatives for now?";
+            this.chkUseDerivatives.UseVisualStyleBackColor = true;
+            // 
+            // chkAllowDerivatives
+            // 
+            this.chkAllowDerivatives.AutoSize = true;
+            this.chkAllowDerivatives.Location = new System.Drawing.Point(18, 304);
+            this.chkAllowDerivatives.Name = "chkAllowDerivatives";
+            this.chkAllowDerivatives.Size = new System.Drawing.Size(645, 22);
+            this.chkAllowDerivatives.TabIndex = 5;
+            this.chkAllowDerivatives.Text = "Does the fund‘s investment objective/policy/investment restriction allow for the " +
+    "use of derivatives?";
+            this.chkAllowDerivatives.UseVisualStyleBackColor = true;
+            // 
+            // btnUploadProcessDiagram
+            // 
+            this.btnUploadProcessDiagram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnUploadProcessDiagram.Location = new System.Drawing.Point(955, 260);
+            this.btnUploadProcessDiagram.Name = "btnUploadProcessDiagram";
+            this.btnUploadProcessDiagram.Size = new System.Drawing.Size(75, 23);
+            this.btnUploadProcessDiagram.TabIndex = 3;
+            this.btnUploadProcessDiagram.Text = "Upload";
+            this.btnUploadProcessDiagram.UseVisualStyleBackColor = true;
+            // 
+            // btnDeleteProcessDiagram
+            // 
+            this.btnDeleteProcessDiagram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnDeleteProcessDiagram.Location = new System.Drawing.Point(874, 260);
+            this.btnDeleteProcessDiagram.Name = "btnDeleteProcessDiagram";
+            this.btnDeleteProcessDiagram.Size = new System.Drawing.Size(75, 23);
+            this.btnDeleteProcessDiagram.TabIndex = 2;
+            this.btnDeleteProcessDiagram.Text = "Delete";
+            this.btnDeleteProcessDiagram.UseVisualStyleBackColor = true;
+            // 
+            // picFundProcess
+            // 
+            this.picFundProcess.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.picFundProcess.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.picFundProcess.Location = new System.Drawing.Point(18, 36);
+            this.picFundProcess.Name = "picFundProcess";
+            this.picFundProcess.Size = new System.Drawing.Size(1012, 218);
+            this.picFundProcess.TabIndex = 1;
+            this.picFundProcess.TabStop = false;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Location = new System.Drawing.Point(18, 15);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(872, 18);
+            this.label10.TabIndex = 0;
+            this.label10.Text = "Use a diagram to help explain your process; including references to the market in" +
+    "efficiencies you aim to exploit and your buy/sell disciplines";
+            // 
             // tabRisk
             // 
             this.tabRisk.Location = new System.Drawing.Point(4, 27);
@@ -385,108 +647,13 @@
             this.tabPerformance.Text = "Performance";
             this.tabPerformance.UseVisualStyleBackColor = true;
             // 
-            // txtAdministrationFee
-            // 
-            this.txtAdministrationFee.Location = new System.Drawing.Point(469, 58);
-            this.txtAdministrationFee.Name = "txtAdministrationFee";
-            this.txtAdministrationFee.Size = new System.Drawing.Size(100, 26);
-            this.txtAdministrationFee.TabIndex = 7;
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(342, 61);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(126, 18);
-            this.label9.TabIndex = 6;
-            this.label9.Text = "Administration Fee";
-            // 
-            // txtTrusteeFee
-            // 
-            this.txtTrusteeFee.Location = new System.Drawing.Point(469, 90);
-            this.txtTrusteeFee.Name = "txtTrusteeFee";
-            this.txtTrusteeFee.Size = new System.Drawing.Size(100, 26);
-            this.txtTrusteeFee.TabIndex = 11;
+            // label16
             // 
-            // label11
-            // 
-            this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(342, 93);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(80, 18);
-            this.label11.TabIndex = 10;
-            this.label11.Text = "Trustee Fee";
-            // 
-            // txtPerformanceFee
-            // 
-            this.txtPerformanceFee.Location = new System.Drawing.Point(150, 126);
-            this.txtPerformanceFee.Multiline = true;
-            this.txtPerformanceFee.Name = "txtPerformanceFee";
-            this.txtPerformanceFee.Size = new System.Drawing.Size(419, 77);
-            this.txtPerformanceFee.TabIndex = 13;
-            // 
-            // label12
-            // 
-            this.label12.AutoSize = true;
-            this.label12.Location = new System.Drawing.Point(23, 129);
-            this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(114, 18);
-            this.label12.TabIndex = 12;
-            this.label12.Text = "Performance Fee";
-            // 
-            // txtSwitchingFee
-            // 
-            this.txtSwitchingFee.Location = new System.Drawing.Point(150, 90);
-            this.txtSwitchingFee.Name = "txtSwitchingFee";
-            this.txtSwitchingFee.Size = new System.Drawing.Size(100, 26);
-            this.txtSwitchingFee.TabIndex = 9;
-            // 
-            // label13
-            // 
-            this.label13.AutoSize = true;
-            this.label13.Location = new System.Drawing.Point(23, 93);
-            this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(94, 18);
-            this.label13.TabIndex = 8;
-            this.label13.Text = "Switching Fee";
-            // 
-            // label14
-            // 
-            this.label14.AutoSize = true;
-            this.label14.Location = new System.Drawing.Point(21, 757);
-            this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(143, 18);
-            this.label14.TabIndex = 11;
-            this.label14.Text = "Policy of Closing Fund";
-            // 
-            // txtPolicyOfClosingFund
-            // 
-            this.txtPolicyOfClosingFund.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtPolicyOfClosingFund.Location = new System.Drawing.Point(24, 779);
-            this.txtPolicyOfClosingFund.Multiline = true;
-            this.txtPolicyOfClosingFund.Name = "txtPolicyOfClosingFund";
-            this.txtPolicyOfClosingFund.Size = new System.Drawing.Size(1007, 167);
-            this.txtPolicyOfClosingFund.TabIndex = 12;
-            // 
-            // panel1
-            // 
-            this.panel1.Controls.Add(this.btnSaveGeneralInfo);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel1.Location = new System.Drawing.Point(3, 946);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1036, 50);
-            this.panel1.TabIndex = 13;
-            // 
-            // btnSaveGeneralInfo
-            // 
-            this.btnSaveGeneralInfo.Location = new System.Drawing.Point(936, 15);
-            this.btnSaveGeneralInfo.Name = "btnSaveGeneralInfo";
-            this.btnSaveGeneralInfo.Size = new System.Drawing.Size(75, 23);
-            this.btnSaveGeneralInfo.TabIndex = 0;
-            this.btnSaveGeneralInfo.Text = "Save";
-            this.btnSaveGeneralInfo.UseVisualStyleBackColor = true;
-            this.btnSaveGeneralInfo.Click += new System.EventHandler(this.btnSaveGeneralInfo_Click);
+            this.label16.AutoSize = true;
+            this.label16.Location = new System.Drawing.Point(24, 936);
+            this.label16.Name = "label16";
+            this.label16.Size = new System.Drawing.Size(0, 18);
+            this.label16.TabIndex = 14;
             // 
             // FundQ
             // 
@@ -504,12 +671,16 @@
             this.panStaticData.PerformLayout();
             this.tbcFund.ResumeLayout(false);
             this.tabGeneralInfo.ResumeLayout(false);
-            this.tabGeneralInfo.PerformLayout();
+            this.panGeneralInfoMain.ResumeLayout(false);
+            this.panGeneralInfoMain.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdTER)).EndInit();
             this.grbFees.ResumeLayout(false);
             this.grbFees.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdPortfolioManager)).EndInit();
-            this.panel1.ResumeLayout(false);
+            this.tabProcess.ResumeLayout(false);
+            this.panel2.ResumeLayout(false);
+            this.panel2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.picFundProcess)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -555,7 +726,20 @@
         private System.Windows.Forms.TextBox txtSwitchingFee;
         private System.Windows.Forms.Label label13;
         private System.Windows.Forms.TextBox txtPolicyOfClosingFund;
-        private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button btnSaveGeneralInfo;
+        private System.Windows.Forms.Panel panel2;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.CheckBox chkAllowDerivatives;
+        private System.Windows.Forms.Button btnUploadProcessDiagram;
+        private System.Windows.Forms.Button btnDeleteProcessDiagram;
+        private System.Windows.Forms.PictureBox picFundProcess;
+        private System.Windows.Forms.CheckBox chkDerivatesForLeverage;
+        private System.Windows.Forms.CheckBox chkDerivativesForMarket;
+        private System.Windows.Forms.CheckBox chkDerivatesForHedging;
+        private System.Windows.Forms.CheckBox chkDerivativesForEfficent;
+        private System.Windows.Forms.Label label15;
+        private System.Windows.Forms.CheckBox chkUseDerivatives;
+        private System.Windows.Forms.Panel panGeneralInfoMain;
+        private System.Windows.Forms.Label label16;
     }
 }

+ 230 - 13
FundQ.cs

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
 using System.Windows.Forms;
 using System.Text.Json;
 using System.Text.Json.Serialization;
+using System.Drawing.Text;
 
 
 namespace ddq
@@ -39,26 +40,196 @@ namespace ddq
             if (dt == null || dt.Rows.Count <= 0) return;
 
             this.lblFundName.Text = dt.Rows[0].Field<string>("fund_short_name");
-            this.lblMainCode.Text = "Code: " + dt.Rows[0].Field<string>("register_number");
+            //this.lblMainCode.Text = "Code: " + dt.Rows[0].Field<string>("register_number");
+            this.lblMainCode.Text = "Code: " + fundId;
             this.lblCategory.Text = "Category: " + dt.Rows[0].Field<string>("strategy");
             this.lblInceptionDate.Text = "Launched: " + dt.Rows[0].Field<DateTime?>("inception_date")?.ToString("yyyy-MM-dd");
             this.lblDomicile.Text = "Domicile: ";
 
             fundInfoTable = DataAccess.Get_dd_fund_info(fundId, null, 1);
 
-            if (fundInfoTable == null || fundInfoTable.Rows.Count <= 0) return;
+            bool hasPM = false;
+            DataTable dtPM;
+            bool hasTER = false;
+            DataTable dtTER;
 
-            string jsonString = fundInfoTable.Rows[0].Field<string>("info").Trim();
+            if (fundInfoTable != null && fundInfoTable.Rows.Count > 0)
+            {
+
+                string jsonString = fundInfoTable.Rows[0].Field<string>("info").Trim();
+
+                JsonDocument document = JsonDocument.Parse(jsonString);
+                JsonElement root = document.RootElement;
+
+                if (root.ValueKind != JsonValueKind.Undefined)
+                {
+
+                    this.txtInvestmentObjective.Text = Json2Text(root, "investmentObjective");
+                    this.txtBenchmark.Text = Json2Text(root, "benchmark");
+                    this.txtInvestmentPhilosophy.Text = Json2Text(root, "investmentPhilosophy");
+
+                    JsonElement elmPM;
+                    hasPM = root.TryGetProperty("portfolioManagers", out elmPM);
+                    
+                    if (hasPM == true)
+                    {
+                        dtPM = Json2Table(elmPM);
+                        InitPortfolioManagerGrid(dtPM);
+                    }
+
+                    JsonElement elmTER;
+                    hasTER = root.TryGetProperty("ter", out elmTER);
+
+                    if (hasTER == true)
+                    {
+                        dtTER = Json2Table(elmTER);
+                        InitTERGrid(dtTER);
+                    }
+
+                    
+                }
+
+            }
+
+            if (hasPM == false) 
+            {
+                dtPM = new DataTable();
+
+                // 没有基金经理数据时,初始化表
+                dtPM.Columns.Add("name", typeof(string));
+                dtPM.Columns.Add("startDate", typeof(DateTime));
+                dtPM.Columns.Add("endDate", typeof(DateTime));
+
+                InitPortfolioManagerGrid(dtPM); 
+            }
+
+            if (hasTER == false)
+            {
+                dtTER = new DataTable();
+
+                dtTER.Columns.Add("year", typeof(int));
+                dtTER.Columns.Add("ter", typeof(decimal));
+
+                int year = DateTime.Today.Year - 1;
+                for (int i = 0; i < 5; i++)
+                {
+                    DataRow row = dtTER.NewRow();
+                    row["year"] = year - i;
+                    dtTER.Rows.Add(row);
+                }
+
+                InitTERGrid(dtTER);
+            }
+
+        }
+
+
+
+        private void InitPortfolioManagerGrid(DataTable dt)
+        {
+            this.grdPortfolioManager.DataSource = dt;
+            this.grdPortfolioManager.Columns["name"].HeaderText = "Manager Name";
+            this.grdPortfolioManager.Columns["name"].DisplayIndex = 0;
+
+            this.grdPortfolioManager.Columns["startDate"].HeaderText = "Start Date";
+            this.grdPortfolioManager.Columns["startDate"].DefaultCellStyle.Format = "yyyy-MM-dd";
+            this.grdPortfolioManager.Columns["startDate"].DisplayIndex = 1;
 
-            JsonDocument document = JsonDocument.Parse(jsonString);
-            JsonElement root = document.RootElement;
+            this.grdPortfolioManager.Columns["endDate"].HeaderText = "End Date";
+            this.grdPortfolioManager.Columns["endDate"].DefaultCellStyle.Format = "yyyy-MM-dd";
+            this.grdPortfolioManager.Columns["endDate"].DisplayIndex = 2;
+        }
+
+
+        private void InitTERGrid(DataTable dt)
+        {
+            this.grdTER.DataSource = dt;
+            this.grdTER.Columns["year"].HeaderText = "Year";
+            this.grdTER.Columns["year"].ReadOnly = true;
+            this.grdTER.Columns["year"].DisplayIndex = 0;
 
-            this.txtInvestmentObjective.Text = root.GetProperty("investmentObjective").ToString();
-            this.txtBenchmark.Text = root.GetProperty("benchmark").ToString();
-            this.txtInvestmentPhilosophy.Text = root.GetProperty("investmentPhilosophy").ToString();
+            this.grdTER.Columns["ter"].HeaderText = "Total Expense Ratio %";
+            this.grdTER.Columns["ter"].ValueType = typeof(decimal);
+            this.grdTER.Columns["ter"].DefaultCellStyle.Format = "N3";
+            this.grdTER.Columns["ter"].DisplayIndex = 1;
 
         }
 
+
+        /// <summary>
+        /// JsonElment 转为字符串,若输入为空则输出""
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        public static string Json2Text(JsonElement jsonElement, string propertyName)
+        {
+            string str = "";
+            JsonElement elm;
+
+            if (propertyName == null) return str;
+
+            bool hasProperty = jsonElement.TryGetProperty(propertyName, out elm);
+
+            if (hasProperty == true && elm.ValueKind != JsonValueKind.Undefined)
+            {
+                str = elm.ToString().Trim();
+            }
+
+            return str;
+        }
+
+        public static DataTable Json2Table(JsonElement jsonElement)
+        {
+            DataTable dataTable = new DataTable();
+
+            // 如果解析出的是数组
+            if (jsonElement.ValueKind == JsonValueKind.Array)
+            {
+                // 遍历数组元素
+                foreach (JsonElement element in jsonElement.EnumerateArray())
+                {
+                    // 如果是第一次遍历,元素包含列定义信息,需要创建列
+                    if (dataTable.Columns.Count == 0)
+                    {
+                        // 遍历第一个对象的属性来创建列
+                        foreach (JsonProperty property in element.EnumerateObject())
+                        {
+                            dataTable.Columns.Add(property.Name);
+                        }
+                    }
+
+                    // 创建新行并填充数据
+                    DataRow newRow = dataTable.NewRow();
+                    foreach (JsonProperty property in element.EnumerateObject())
+                    {
+                        newRow[property.Name] = property.Value.ToString();
+                    }
+                    dataTable.Rows.Add(newRow);
+                }
+            }
+
+            return dataTable;
+
+        }
+
+        public static List<Dictionary<string, object>> DataTable2List(DataTable dataTable)
+        {
+            var records = new List<Dictionary<string, object>>();
+
+            foreach (DataRow row in dataTable.Rows)
+            {
+                var record = new Dictionary<string, object>();
+                foreach (DataColumn col in dataTable.Columns)
+                {
+                    // 处理DBNull值
+                    record[col.ColumnName] = row[col] == DBNull.Value ? null : row[col];
+                }
+                records.Add(record);
+            }
+
+            return records;
+        }
+
         private void FundQ_Load(object sender, EventArgs e)
         {
         }
@@ -71,11 +242,13 @@ namespace ddq
                 // 数据对象
                 var textData = new
                 {
-                    FundId = this.fundId,
-                    InvestmentObjective = this.txtInvestmentObjective.Text,
-                    Benchmark = this.txtBenchmark.Text,
-                    InvestmentPhilosophy = this.txtInvestmentPhilosophy.Text,
-                    UpdateTime = DateTime.Now
+                    fundId = this.fundId,
+                    investmentObjective = this.txtInvestmentObjective.Text,
+                    benchmark = this.txtBenchmark.Text,
+                    investmentPhilosophy = this.txtInvestmentPhilosophy.Text,
+                    portfolioManagers = DataTable2List((DataTable)this.grdPortfolioManager.DataSource),
+                    ter = DataTable2List((DataTable)this.grdTER.DataSource),
+                    updateTime = DateTime.Now
                 };
 
                 // 序列化选项
@@ -102,5 +275,49 @@ namespace ddq
                 MessageBox.Show($"Error: {ex.Message}", "Error");
             }
         }
+
+        private void grdTER_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
+        {
+
+            string errMsg = "Please enter a number between 0 and 100, with up to 3 decimal digits";
+
+            if (grdTER.Columns[e.ColumnIndex].Name == "ter" && e.RowIndex >= 0)
+            {
+                // 先清除可能存在的旧错误提示
+                grdTER.Rows[e.RowIndex].ErrorText = "";
+
+                if (e.FormattedValue.ToString().Trim() == "") return;
+
+                // 尝试将输入的值转换为小数
+                if (!decimal.TryParse(e.FormattedValue.ToString(), out decimal newValue))
+                {
+                    // 如果转换失败,说明输入的不是有效数字
+                    e.Cancel = true;
+                    grdTER.Rows[e.RowIndex].ErrorText = errMsg;
+                    return;
+                }
+
+                // 验证数值范围(例如限制在0到100之间)
+                if (newValue < 0 || newValue > 100)
+                {
+                    e.Cancel = true;
+                    grdTER.Rows[e.RowIndex].ErrorText = errMsg;
+                    return;
+                }
+
+                // (可选) 自定义验证小数位数
+                string[] parts = e.FormattedValue.ToString().Split('.');
+                if (parts.Length > 1 && parts[1].Length > 3) // 检查小数点后的位数
+                {
+                    e.Cancel = true;
+                    grdTER.Rows[e.RowIndex].ErrorText = errMsg;
+                }
+            }
+        }
+
+        private void btnSaveFundProcess_Click(object sender, EventArgs e)
+        {
+          
+        }
     }
 }