Joey пре 1 дан
родитељ
комит
646f2e0440
7 измењених фајлова са 873 додато и 72 уклоњено
  1. 423 45
      DDQ.Designer.cs
  2. 341 19
      DDQ.cs
  3. 3 0
      DDQ.resx
  4. 60 0
      DataAccess.cs
  5. 7 8
      FundQ.Designer.cs
  6. 18 0
      FundQ.cs
  7. 21 0
      Utility.cs

+ 423 - 45
DDQ.Designer.cs

@@ -47,17 +47,44 @@
             this.cmbFundCategory = new System.Windows.Forms.ComboBox();
             this.label2 = new System.Windows.Forms.Label();
             this.btnSearchFund = new System.Windows.Forms.Button();
-            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.txtSearchFund = new System.Windows.Forms.TextBox();
             this.tabPeople = new System.Windows.Forms.TabPage();
+            this.btnAddPersonn = new System.Windows.Forms.Button();
             this.grdPeopleList = new System.Windows.Forms.DataGridView();
             this.panPeopleTool = new System.Windows.Forms.Panel();
             this.cmbRole = new System.Windows.Forms.ComboBox();
             this.label3 = new System.Windows.Forms.Label();
-            this.button1 = new System.Windows.Forms.Button();
-            this.textBox2 = new System.Windows.Forms.TextBox();
+            this.btnSearchPeople = new System.Windows.Forms.Button();
+            this.txtSearchPeople = new System.Windows.Forms.TextBox();
             this.tabCompany = new System.Windows.Forms.TabPage();
+            this.panCompanyBottom = new System.Windows.Forms.Panel();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.grdClientBreakdown = new System.Windows.Forms.DataGridView();
+            this.label12 = new System.Windows.Forms.Label();
+            this.grdAUM = new System.Windows.Forms.DataGridView();
+            this.label11 = new System.Windows.Forms.Label();
+            this.grdCreditRating = new System.Windows.Forms.DataGridView();
+            this.label10 = new System.Windows.Forms.Label();
+            this.grdFinancialData = new System.Windows.Forms.DataGridView();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.txtParentCompanyName = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.txtDetailOfAcquired = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.grdAcquisiton = new System.Windows.Forms.DataGridView();
+            this.label5 = new System.Windows.Forms.Label();
+            this.dtpIncepionDate = new System.Windows.Forms.DateTimePicker();
+            this.label4 = new System.Windows.Forms.Label();
             this.tabSettings = new System.Windows.Forms.TabPage();
-            this.btnAddPersonn = new System.Windows.Forms.Button();
+            this.btnSaveCompany = new System.Windows.Forms.Button();
+            this.chkSupportFinancial = new System.Windows.Forms.CheckBox();
+            this.chkSupportSales = new System.Windows.Forms.CheckBox();
+            this.chkSupportMarketing = new System.Windows.Forms.CheckBox();
+            this.chkSupportTechnical = new System.Windows.Forms.CheckBox();
+            this.chkSupportPersonnel = new System.Windows.Forms.CheckBox();
+            this.agent = new System.Windows.Forms.DataGridViewComboBoxColumn();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.tbcMain.SuspendLayout();
             this.tabRequests.SuspendLayout();
             this.panRequests.SuspendLayout();
@@ -73,6 +100,15 @@
             this.tabPeople.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdPeopleList)).BeginInit();
             this.panPeopleTool.SuspendLayout();
+            this.tabCompany.SuspendLayout();
+            this.panCompanyBottom.SuspendLayout();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdClientBreakdown)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdAUM)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdCreditRating)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdFinancialData)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdAcquisiton)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
             // tbcMain
@@ -258,7 +294,7 @@
             this.panFundsTool.Controls.Add(this.cmbFundCategory);
             this.panFundsTool.Controls.Add(this.label2);
             this.panFundsTool.Controls.Add(this.btnSearchFund);
-            this.panFundsTool.Controls.Add(this.textBox1);
+            this.panFundsTool.Controls.Add(this.txtSearchFund);
             this.panFundsTool.Dock = System.Windows.Forms.DockStyle.Top;
             this.panFundsTool.Location = new System.Drawing.Point(3, 3);
             this.panFundsTool.Name = "panFundsTool";
@@ -268,6 +304,7 @@
             // cmbFundCategory
             // 
             this.cmbFundCategory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.cmbFundCategory.Enabled = false;
             this.cmbFundCategory.FormattingEnabled = true;
             this.cmbFundCategory.Location = new System.Drawing.Point(562, 18);
             this.cmbFundCategory.Name = "cmbFundCategory";
@@ -286,6 +323,7 @@
             // 
             // btnSearchFund
             // 
+            this.btnSearchFund.Enabled = false;
             this.btnSearchFund.Location = new System.Drawing.Point(281, 18);
             this.btnSearchFund.Name = "btnSearchFund";
             this.btnSearchFund.Size = new System.Drawing.Size(75, 26);
@@ -293,15 +331,16 @@
             this.btnSearchFund.Text = "Search";
             this.btnSearchFund.UseVisualStyleBackColor = true;
             // 
-            // textBox1
+            // txtSearchFund
             // 
-            this.textBox1.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.textBox1.ForeColor = System.Drawing.SystemColors.GrayText;
-            this.textBox1.Location = new System.Drawing.Point(20, 18);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(255, 26);
-            this.textBox1.TabIndex = 0;
-            this.textBox1.Text = "Type in fund name";
+            this.txtSearchFund.Enabled = false;
+            this.txtSearchFund.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.txtSearchFund.ForeColor = System.Drawing.SystemColors.GrayText;
+            this.txtSearchFund.Location = new System.Drawing.Point(20, 18);
+            this.txtSearchFund.Name = "txtSearchFund";
+            this.txtSearchFund.Size = new System.Drawing.Size(255, 26);
+            this.txtSearchFund.TabIndex = 0;
+            this.txtSearchFund.Text = "Type in fund name";
             // 
             // tabPeople
             // 
@@ -316,12 +355,25 @@
             this.tabPeople.Text = "People";
             this.tabPeople.UseVisualStyleBackColor = true;
             // 
+            // btnAddPersonn
+            // 
+            this.btnAddPersonn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnAddPersonn.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.btnAddPersonn.Location = new System.Drawing.Point(644, 78);
+            this.btnAddPersonn.Name = "btnAddPersonn";
+            this.btnAddPersonn.Size = new System.Drawing.Size(128, 23);
+            this.btnAddPersonn.TabIndex = 2;
+            this.btnAddPersonn.Text = "Add a staff";
+            this.btnAddPersonn.UseVisualStyleBackColor = true;
+            this.btnAddPersonn.Click += new System.EventHandler(this.btnAddPersonn_Click);
+            // 
             // grdPeopleList
             // 
             this.grdPeopleList.AllowUserToAddRows = false;
             this.grdPeopleList.AllowUserToDeleteRows = false;
             this.grdPeopleList.AllowUserToOrderColumns = true;
-            this.grdPeopleList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.grdPeopleList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.grdPeopleList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
             this.grdPeopleList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
@@ -338,8 +390,8 @@
             // 
             this.panPeopleTool.Controls.Add(this.cmbRole);
             this.panPeopleTool.Controls.Add(this.label3);
-            this.panPeopleTool.Controls.Add(this.button1);
-            this.panPeopleTool.Controls.Add(this.textBox2);
+            this.panPeopleTool.Controls.Add(this.btnSearchPeople);
+            this.panPeopleTool.Controls.Add(this.txtSearchPeople);
             this.panPeopleTool.Dock = System.Windows.Forms.DockStyle.Top;
             this.panPeopleTool.Location = new System.Drawing.Point(3, 3);
             this.panPeopleTool.Name = "panPeopleTool";
@@ -349,6 +401,7 @@
             // cmbRole
             // 
             this.cmbRole.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.cmbRole.Enabled = false;
             this.cmbRole.FormattingEnabled = true;
             this.cmbRole.Location = new System.Drawing.Point(559, 18);
             this.cmbRole.Name = "cmbRole";
@@ -365,27 +418,31 @@
             this.label3.TabIndex = 4;
             this.label3.Text = "Role";
             // 
-            // button1
+            // btnSearchPeople
             // 
-            this.button1.Location = new System.Drawing.Point(280, 18);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 26);
-            this.button1.TabIndex = 3;
-            this.button1.Text = "Search";
-            this.button1.UseVisualStyleBackColor = true;
+            this.btnSearchPeople.Enabled = false;
+            this.btnSearchPeople.Location = new System.Drawing.Point(280, 18);
+            this.btnSearchPeople.Name = "btnSearchPeople";
+            this.btnSearchPeople.Size = new System.Drawing.Size(75, 26);
+            this.btnSearchPeople.TabIndex = 3;
+            this.btnSearchPeople.Text = "Search";
+            this.btnSearchPeople.UseVisualStyleBackColor = true;
             // 
-            // textBox2
+            // txtSearchPeople
             // 
-            this.textBox2.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.textBox2.ForeColor = System.Drawing.SystemColors.GrayText;
-            this.textBox2.Location = new System.Drawing.Point(19, 18);
-            this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(255, 26);
-            this.textBox2.TabIndex = 2;
-            this.textBox2.Text = "Type in fund name";
+            this.txtSearchPeople.Enabled = false;
+            this.txtSearchPeople.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.txtSearchPeople.ForeColor = System.Drawing.SystemColors.GrayText;
+            this.txtSearchPeople.Location = new System.Drawing.Point(19, 18);
+            this.txtSearchPeople.Name = "txtSearchPeople";
+            this.txtSearchPeople.Size = new System.Drawing.Size(255, 26);
+            this.txtSearchPeople.TabIndex = 2;
+            this.txtSearchPeople.Text = "Type in fund name";
             // 
             // tabCompany
             // 
+            this.tabCompany.Controls.Add(this.panCompanyBottom);
+            this.tabCompany.Controls.Add(this.panel1);
             this.tabCompany.Location = new System.Drawing.Point(4, 4);
             this.tabCompany.Name = "tabCompany";
             this.tabCompany.Size = new System.Drawing.Size(778, 450);
@@ -393,6 +450,223 @@
             this.tabCompany.Text = "Company";
             this.tabCompany.UseVisualStyleBackColor = true;
             // 
+            // panCompanyBottom
+            // 
+            this.panCompanyBottom.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.panCompanyBottom.Controls.Add(this.btnSaveCompany);
+            this.panCompanyBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.panCompanyBottom.Location = new System.Drawing.Point(0, 402);
+            this.panCompanyBottom.Name = "panCompanyBottom";
+            this.panCompanyBottom.Size = new System.Drawing.Size(778, 48);
+            this.panCompanyBottom.TabIndex = 1;
+            // 
+            // panel1
+            // 
+            this.panel1.AutoScroll = true;
+            this.panel1.Controls.Add(this.pictureBox1);
+            this.panel1.Controls.Add(this.chkSupportPersonnel);
+            this.panel1.Controls.Add(this.chkSupportTechnical);
+            this.panel1.Controls.Add(this.chkSupportMarketing);
+            this.panel1.Controls.Add(this.chkSupportSales);
+            this.panel1.Controls.Add(this.chkSupportFinancial);
+            this.panel1.Controls.Add(this.grdClientBreakdown);
+            this.panel1.Controls.Add(this.label12);
+            this.panel1.Controls.Add(this.grdAUM);
+            this.panel1.Controls.Add(this.label11);
+            this.panel1.Controls.Add(this.grdCreditRating);
+            this.panel1.Controls.Add(this.label10);
+            this.panel1.Controls.Add(this.grdFinancialData);
+            this.panel1.Controls.Add(this.label9);
+            this.panel1.Controls.Add(this.label8);
+            this.panel1.Controls.Add(this.txtParentCompanyName);
+            this.panel1.Controls.Add(this.label7);
+            this.panel1.Controls.Add(this.txtDetailOfAcquired);
+            this.panel1.Controls.Add(this.label6);
+            this.panel1.Controls.Add(this.grdAcquisiton);
+            this.panel1.Controls.Add(this.label5);
+            this.panel1.Controls.Add(this.dtpIncepionDate);
+            this.panel1.Controls.Add(this.label4);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(778, 450);
+            this.panel1.TabIndex = 0;
+            // 
+            // grdClientBreakdown
+            // 
+            this.grdClientBreakdown.AllowUserToAddRows = false;
+            this.grdClientBreakdown.AllowUserToDeleteRows = false;
+            this.grdClientBreakdown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdClientBreakdown.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdClientBreakdown.Location = new System.Drawing.Point(29, 1022);
+            this.grdClientBreakdown.Name = "grdClientBreakdown";
+            this.grdClientBreakdown.RowTemplate.Height = 23;
+            this.grdClientBreakdown.Size = new System.Drawing.Size(706, 104);
+            this.grdClientBreakdown.TabIndex = 20;
+            // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Location = new System.Drawing.Point(26, 1000);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(460, 18);
+            this.label12.TabIndex = 19;
+            this.label12.Text = "Retail/Instituitional Breakdown (as accurate of 31 December of each year)";
+            // 
+            // grdAUM
+            // 
+            this.grdAUM.AllowUserToAddRows = false;
+            this.grdAUM.AllowUserToDeleteRows = false;
+            this.grdAUM.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdAUM.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdAUM.Location = new System.Drawing.Point(29, 909);
+            this.grdAUM.Name = "grdAUM";
+            this.grdAUM.RowTemplate.Height = 23;
+            this.grdAUM.Size = new System.Drawing.Size(706, 74);
+            this.grdAUM.TabIndex = 18;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Location = new System.Drawing.Point(26, 887);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(470, 18);
+            this.label11.TabIndex = 17;
+            this.label11.Text = "Asset Under Management (AUM) (as accurate of 31 December of each year)";
+            // 
+            // grdCreditRating
+            // 
+            this.grdCreditRating.AllowUserToDeleteRows = false;
+            this.grdCreditRating.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdCreditRating.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
+            this.grdCreditRating.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdCreditRating.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.agent});
+            this.grdCreditRating.Location = new System.Drawing.Point(29, 717);
+            this.grdCreditRating.Name = "grdCreditRating";
+            this.grdCreditRating.RowTemplate.Height = 23;
+            this.grdCreditRating.Size = new System.Drawing.Size(706, 150);
+            this.grdCreditRating.TabIndex = 16;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Location = new System.Drawing.Point(26, 695);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(463, 18);
+            this.label10.TabIndex = 15;
+            this.label10.Text = "Credit Rating of the company or parent company (whichever is applicable)";
+            // 
+            // grdFinancialData
+            // 
+            this.grdFinancialData.AllowUserToAddRows = false;
+            this.grdFinancialData.AllowUserToDeleteRows = false;
+            this.grdFinancialData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdFinancialData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
+            this.grdFinancialData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdFinancialData.Location = new System.Drawing.Point(29, 518);
+            this.grdFinancialData.Name = "grdFinancialData";
+            this.grdFinancialData.RowTemplate.Height = 23;
+            this.grdFinancialData.Size = new System.Drawing.Size(706, 150);
+            this.grdFinancialData.TabIndex = 14;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Location = new System.Drawing.Point(26, 497);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(469, 18);
+            this.label9.TabIndex = 13;
+            this.label9.Text = "Financial data of the company or parent company (whichever is applicable)";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(26, 428);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(385, 18);
+            this.label8.TabIndex = 11;
+            this.label8.Text = "Select all types of supports provided by your parent company";
+            // 
+            // txtParentCompanyName
+            // 
+            this.txtParentCompanyName.Location = new System.Drawing.Point(145, 377);
+            this.txtParentCompanyName.Name = "txtParentCompanyName";
+            this.txtParentCompanyName.Size = new System.Drawing.Size(430, 26);
+            this.txtParentCompanyName.TabIndex = 10;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(26, 380);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(110, 18);
+            this.label7.TabIndex = 9;
+            this.label7.Text = "Parent Company";
+            // 
+            // txtDetailOfAcquired
+            // 
+            this.txtDetailOfAcquired.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtDetailOfAcquired.Location = new System.Drawing.Point(29, 276);
+            this.txtDetailOfAcquired.Multiline = true;
+            this.txtDetailOfAcquired.Name = "txtDetailOfAcquired";
+            this.txtDetailOfAcquired.Size = new System.Drawing.Size(706, 76);
+            this.txtDetailOfAcquired.TabIndex = 5;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(26, 254);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(606, 18);
+            this.label6.TabIndex = 4;
+            this.label6.Text = "If your firm has recently been acquired by another entity, please describe in det" +
+    "ail the acquisition";
+            // 
+            // grdAcquisiton
+            // 
+            this.grdAcquisiton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdAcquisiton.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
+            this.grdAcquisiton.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdAcquisiton.Location = new System.Drawing.Point(29, 80);
+            this.grdAcquisiton.Name = "grdAcquisiton";
+            this.grdAcquisiton.RowTemplate.Height = 23;
+            this.grdAcquisiton.Size = new System.Drawing.Size(706, 150);
+            this.grdAcquisiton.TabIndex = 3;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(23, 58);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(385, 18);
+            this.label5.TabIndex = 2;
+            this.label5.Text = "Recent changes in capital structure, mergers/acquisitions etc.";
+            // 
+            // dtpIncepionDate
+            // 
+            this.dtpIncepionDate.Location = new System.Drawing.Point(138, 16);
+            this.dtpIncepionDate.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
+            this.dtpIncepionDate.Name = "dtpIncepionDate";
+            this.dtpIncepionDate.Size = new System.Drawing.Size(146, 26);
+            this.dtpIncepionDate.TabIndex = 1;
+            this.dtpIncepionDate.Value = new System.DateTime(2025, 10, 26, 0, 0, 0, 0);
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(20, 20);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(95, 18);
+            this.label4.TabIndex = 0;
+            this.label4.Text = "Date Founded";
+            // 
             // tabSettings
             // 
             this.tabSettings.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -403,17 +677,84 @@
             this.tabSettings.Text = "Settings";
             this.tabSettings.UseVisualStyleBackColor = true;
             // 
-            // btnAddPersonn
-            // 
-            this.btnAddPersonn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnAddPersonn.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.btnAddPersonn.Location = new System.Drawing.Point(644, 78);
-            this.btnAddPersonn.Name = "btnAddPersonn";
-            this.btnAddPersonn.Size = new System.Drawing.Size(128, 23);
-            this.btnAddPersonn.TabIndex = 2;
-            this.btnAddPersonn.Text = "Add a staff";
-            this.btnAddPersonn.UseVisualStyleBackColor = true;
-            this.btnAddPersonn.Click += new System.EventHandler(this.btnAddPersonn_Click);
+            // btnSaveCompany
+            // 
+            this.btnSaveCompany.Location = new System.Drawing.Point(685, 12);
+            this.btnSaveCompany.Name = "btnSaveCompany";
+            this.btnSaveCompany.Size = new System.Drawing.Size(75, 23);
+            this.btnSaveCompany.TabIndex = 0;
+            this.btnSaveCompany.Text = "Save";
+            this.btnSaveCompany.UseVisualStyleBackColor = true;
+            this.btnSaveCompany.Click += new System.EventHandler(this.btnSaveCompany_Click);
+            // 
+            // chkSupportFinancial
+            // 
+            this.chkSupportFinancial.AutoSize = true;
+            this.chkSupportFinancial.Location = new System.Drawing.Point(49, 453);
+            this.chkSupportFinancial.Name = "chkSupportFinancial";
+            this.chkSupportFinancial.Size = new System.Drawing.Size(82, 22);
+            this.chkSupportFinancial.TabIndex = 22;
+            this.chkSupportFinancial.Text = "Financial";
+            this.chkSupportFinancial.UseVisualStyleBackColor = true;
+            // 
+            // chkSupportSales
+            // 
+            this.chkSupportSales.AutoSize = true;
+            this.chkSupportSales.Location = new System.Drawing.Point(165, 453);
+            this.chkSupportSales.Name = "chkSupportSales";
+            this.chkSupportSales.Size = new System.Drawing.Size(59, 22);
+            this.chkSupportSales.TabIndex = 23;
+            this.chkSupportSales.Text = "Sales";
+            this.chkSupportSales.UseVisualStyleBackColor = true;
+            // 
+            // chkSupportMarketing
+            // 
+            this.chkSupportMarketing.AutoSize = true;
+            this.chkSupportMarketing.Location = new System.Drawing.Point(256, 453);
+            this.chkSupportMarketing.Name = "chkSupportMarketing";
+            this.chkSupportMarketing.Size = new System.Drawing.Size(89, 22);
+            this.chkSupportMarketing.TabIndex = 24;
+            this.chkSupportMarketing.Text = "Marketing";
+            this.chkSupportMarketing.UseVisualStyleBackColor = true;
+            // 
+            // chkSupportTechnical
+            // 
+            this.chkSupportTechnical.AutoSize = true;
+            this.chkSupportTechnical.Location = new System.Drawing.Point(375, 453);
+            this.chkSupportTechnical.Name = "chkSupportTechnical";
+            this.chkSupportTechnical.Size = new System.Drawing.Size(84, 22);
+            this.chkSupportTechnical.TabIndex = 25;
+            this.chkSupportTechnical.Text = "Technical";
+            this.chkSupportTechnical.UseVisualStyleBackColor = true;
+            // 
+            // chkSupportPersonnel
+            // 
+            this.chkSupportPersonnel.AutoSize = true;
+            this.chkSupportPersonnel.Location = new System.Drawing.Point(485, 453);
+            this.chkSupportPersonnel.Name = "chkSupportPersonnel";
+            this.chkSupportPersonnel.Size = new System.Drawing.Size(90, 22);
+            this.chkSupportPersonnel.TabIndex = 26;
+            this.chkSupportPersonnel.Text = "Personnel";
+            this.chkSupportPersonnel.UseVisualStyleBackColor = true;
+            // 
+            // agent
+            // 
+            this.agent.DataPropertyName = "agent";
+            this.agent.HeaderText = "Rating Agent";
+            this.agent.Items.AddRange(new object[] {
+            "Moody\'s",
+            "S&P",
+            "Fitch"});
+            this.agent.Name = "agent";
+            this.agent.Width = 92;
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Location = new System.Drawing.Point(29, 1151);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(688, 47);
+            this.pictureBox1.TabIndex = 27;
+            this.pictureBox1.TabStop = false;
             // 
             // frmMain
             // 
@@ -443,6 +784,16 @@
             ((System.ComponentModel.ISupportInitialize)(this.grdPeopleList)).EndInit();
             this.panPeopleTool.ResumeLayout(false);
             this.panPeopleTool.PerformLayout();
+            this.tabCompany.ResumeLayout(false);
+            this.panCompanyBottom.ResumeLayout(false);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdClientBreakdown)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdAUM)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdCreditRating)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdFinancialData)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdAcquisiton)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -466,7 +817,7 @@
         private System.Windows.Forms.TabPage tabPeople;
         private System.Windows.Forms.Panel panFundList;
         private System.Windows.Forms.Panel panFundsTool;
-        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.TextBox txtSearchFund;
         private System.Windows.Forms.TabPage tabCompany;
         private System.Windows.Forms.DataGridView grdFundList;
         private System.Windows.Forms.ComboBox cmbFundCategory;
@@ -474,11 +825,38 @@
         private System.Windows.Forms.Button btnSearchFund;
         private System.Windows.Forms.DataGridView grdPeopleList;
         private System.Windows.Forms.Panel panPeopleTool;
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.TextBox textBox2;
+        private System.Windows.Forms.Button btnSearchPeople;
+        private System.Windows.Forms.TextBox txtSearchPeople;
         private System.Windows.Forms.ComboBox cmbRole;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Button btnAddPersonn;
+        private System.Windows.Forms.Panel panCompanyBottom;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.DateTimePicker dtpIncepionDate;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox txtDetailOfAcquired;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.DataGridView grdAcquisiton;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox txtParentCompanyName;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.DataGridView grdCreditRating;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.DataGridView grdFinancialData;
+        private System.Windows.Forms.DataGridView grdClientBreakdown;
+        private System.Windows.Forms.Label label12;
+        private System.Windows.Forms.DataGridView grdAUM;
+        private System.Windows.Forms.Button btnSaveCompany;
+        private System.Windows.Forms.CheckBox chkSupportFinancial;
+        private System.Windows.Forms.CheckBox chkSupportPersonnel;
+        private System.Windows.Forms.CheckBox chkSupportTechnical;
+        private System.Windows.Forms.CheckBox chkSupportMarketing;
+        private System.Windows.Forms.CheckBox chkSupportSales;
+        private System.Windows.Forms.DataGridViewComboBoxColumn agent;
+        private System.Windows.Forms.PictureBox pictureBox1;
     }
 }
 

+ 341 - 19
DDQ.cs

@@ -1,10 +1,13 @@
-using System;
+using Org.BouncyCastle.Asn1.Pkcs;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.Linq;
+using System.Security.Policy;
 using System.Text;
+using System.Text.Json;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows.Forms;
@@ -38,7 +41,8 @@ namespace ddq
             // Request
             if (tbcMain.SelectedIndex == 0) { }
             // Data
-            else if (tbcMain.SelectedIndex == 1) {
+            else if (tbcMain.SelectedIndex == 1)
+            {
 
                 LoadFundList(companyId);
             }
@@ -46,7 +50,25 @@ namespace ddq
             else { };
         }
 
+        private void tbcData_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (tbcData.SelectedIndex == 0)
+            {
+                LoadFundList(companyId);
+            }
+            else if (tbcData.SelectedIndex == 1)
+            {
+                LoadPeopleList(companyId);
+            }
+            else if (tbcData.SelectedIndex == 2)
+            {
+                InitCompanyData(companyId);
+            }
+        }
 
+        //
+        // Fund
+        //
         private void LoadFundList(string companyId)
         {
             if (fundDataTable == null)
@@ -95,6 +117,13 @@ namespace ddq
 
         }
 
+
+
+
+        //
+        //  People
+        //
+
         private void LoadPeopleList(string companyId)
         {
             if (peopleDataTable == null)
@@ -122,22 +151,6 @@ namespace ddq
 
         }
 
-
-        private void tbcData_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            if (tbcData.SelectedIndex == 0)
-            {
-                LoadFundList(companyId);
-            }
-            else if (tbcData.SelectedIndex == 1)
-            {
-                LoadPeopleList(companyId);
-            }
-            else { }
-        }
-        //
-        //  People
-        //
         private void btnAddPersonn_Click(object sender, EventArgs e)
         {
             LoadPersonnelQ(null);
@@ -164,11 +177,320 @@ namespace ddq
                 if (result == DialogResult.OK)
                 {
                     peopleDataTable = DataAccess.Get_dd_personnel_info(null, this.companyId);
-                    
+
                     this.grdPeopleList.DataSource = peopleDataTable;
                 }
 
             }
         }
+
+        //
+        // Company
+        //
+        private void InitCompanyData(string companyId)
+        {
+
+            DataTable dt = DataAccess.Get_dd_company_info(companyId, null, 1);
+
+            if (dt == null || dt.Rows.Count <= 0) return;
+
+
+            if (dt != null && dt.Rows.Count > 0)
+            {
+
+                string jsonString = dt.Rows[0].Field<string>("info").Trim();
+
+                JsonDocument document = JsonDocument.Parse(jsonString);
+                JsonElement root = document.RootElement;
+
+                if (root.ValueKind != JsonValueKind.Undefined)
+                {
+                    //
+                    // General Info
+                    //
+                    bool isDate = DateTime.TryParse(Utility.Json2Text(root, "foundingDate"), out DateTime newDate);
+                    if (isDate) this.dtpIncepionDate.Value = newDate.Date;
+
+                    this.txtDetailOfAcquired.Text = Utility.Json2Text(root, "detailOfAcquired");
+                    this.txtParentCompanyName.Text = Utility.Json2Text(root, "parentCompanyName");
+
+                    LoadAcqusitionGrid(root);
+
+                    LoadSupportFromParentCompany(root);
+
+                    LoadFinancialData(root);
+
+                    LoadCreditRating(root);
+
+                    LoadCompanyAUM(root);
+
+                    LoadClientBreakdown(root);
+                }
+            }
+        }
+
+        private void LoadAcqusitionGrid(JsonElement element)
+        {
+
+            bool hasData = element.TryGetProperty("acqusition", out element);
+
+            DataTable dt = new DataTable();
+
+            if (hasData == true)
+            {
+                dt = Utility.Json2Table(element);
+            } else
+            {
+                dt.Columns.Add("date", typeof(string));
+                dt.Columns.Add("action", typeof(string));
+            }
+
+            this.grdAcquisiton.DataSource = dt;
+
+            this.grdAcquisiton.Columns["date"].HeaderText = "Date";
+            this.grdAcquisiton.Columns["date"].DefaultCellStyle.Format = "yyyy-MM-dd";
+            this.grdAcquisiton.Columns["date"].DisplayIndex = 0;
+
+            this.grdAcquisiton.Columns["action"].HeaderText = "Event";
+            this.grdAcquisiton.Columns["action"].DisplayIndex = 1;
+        }
+
+
+        private void LoadSupportFromParentCompany(JsonElement element)
+        {
+
+            bool hasData = element.TryGetProperty("supportFromParent", out element);
+
+            if (hasData == false) return;
+
+            this.chkSupportFinancial.Checked = Utility.Json2Boolean(element, "financial");
+            this.chkSupportSales.Checked = Utility.Json2Boolean(element, "sales");
+            this.chkSupportMarketing.Checked = Utility.Json2Boolean(element, "marketing"); ;
+            this.chkSupportTechnical.Checked = Utility.Json2Boolean(element, "technical"); ;
+            this.chkSupportPersonnel.Checked = Utility.Json2Boolean(element, "personnel");
+
+        }
+
+        private void LoadFinancialData(JsonElement element)
+        {
+            bool hasData = element.TryGetProperty("financialData", out element);
+
+            DataTable dt = new DataTable();
+
+            if (hasData == true)
+            {
+                dt = Utility.Json2Table(element);
+            }
+            else
+            {
+                dt.Columns.Add("year", typeof(int));
+                dt.Columns.Add("netIncome", typeof(int));
+                dt.Columns.Add("operatingCashFlow", typeof(int));
+                dt.Columns.Add("interestCoverageRatio", typeof(decimal));
+
+                
+                for (int i = 1; i <= 5; i++)
+                {
+                    DataRow row = dt.NewRow();
+
+                    row.SetField("year", DateTime.Today.Year - i);
+
+                    dt.Rows.Add(row);
+                }
+            }
+
+            this.grdFinancialData.DataSource = dt;
+
+            this.grdFinancialData.Columns["year"].HeaderText = "Year";
+            this.grdFinancialData.Columns["year"].DisplayIndex = 0;
+
+            this.grdFinancialData.Columns["netIncome"].HeaderText = "Net Income (US$ Mil)";
+            this.grdFinancialData.Columns["netIncome"].DisplayIndex = 1;
+
+            this.grdFinancialData.Columns["operatingCashFlow"].HeaderText = "Operating Cash Flow (US$ Mil)";
+            this.grdFinancialData.Columns["operatingCashFlow"].DisplayIndex = 2;
+
+            this.grdFinancialData.Columns["interestCoverageRatio"].HeaderText = "Interest Coverage Ratio (%)";
+            this.grdFinancialData.Columns["interestCoverageRatio"].DefaultCellStyle.Format = "N2";
+            this.grdFinancialData.Columns["interestCoverageRatio"].DisplayIndex = 3;
+
+        }
+
+        private void LoadCreditRating(JsonElement element)
+        {
+            bool hasData = element.TryGetProperty("creditRating", out element);
+
+            DataTable dt = new DataTable();
+
+            if (hasData == true)
+            {
+                dt = Utility.Json2Table(element);
+            }
+            else
+            {
+                dt.Columns.Add("agent", typeof(string));
+                dt.Columns.Add("outlook", typeof(string));
+                dt.Columns.Add("longTerm", typeof(string));
+                dt.Columns.Add("shortTerm", typeof(string));
+                dt.Columns.Add("seniorUnsecured", typeof(string));
+                dt.Columns.Add("subordinated", typeof(string));
+                dt.Columns.Add("trustPreferred", typeof(string));
+                dt.Columns.Add("preferred", typeof(string));
+
+            }
+
+            this.grdCreditRating.DataSource = dt;
+
+            this.grdCreditRating.Columns["agent"].DisplayIndex = 0;
+
+            this.grdCreditRating.Columns["outlook"].HeaderText = "Outlook";
+            this.grdCreditRating.Columns["outlook"].DisplayIndex = 1;
+
+            this.grdCreditRating.Columns["longTerm"].HeaderText = "Long-term Issuer Rating";
+            this.grdCreditRating.Columns["longTerm"].DisplayIndex = 2;
+
+            this.grdCreditRating.Columns["shortTerm"].HeaderText = "Short-term Issuer Rating";
+            this.grdCreditRating.Columns["shortTerm"].DisplayIndex = 3;
+
+            this.grdCreditRating.Columns["seniorUnsecured"].HeaderText = "Senior Unsecured";
+            this.grdCreditRating.Columns["seniorUnsecured"].DisplayIndex = 4;
+
+            this.grdCreditRating.Columns["subordinated"].HeaderText = "Sub-ordinated";
+            this.grdCreditRating.Columns["subordinated"].DisplayIndex = 5;
+
+            this.grdCreditRating.Columns["trustPreferred"].HeaderText = "Trust Preferred";
+            this.grdCreditRating.Columns["trustPreferred"].DisplayIndex = 6;
+
+            this.grdCreditRating.Columns["preferred"].HeaderText = "Preferred Stock";
+            this.grdCreditRating.Columns["preferred"].DisplayIndex = 7;
+
+        }
+
+        private void LoadCompanyAUM(JsonElement element)
+        {
+            bool hasData = element.TryGetProperty("aum", out element);
+
+            DataTable dt = new DataTable();
+
+            if (hasData == true)
+            {
+                dt = Utility.Json2Table(element);
+            }
+            else
+            {
+                for (int i = 1; i <= 5; i++)
+                {
+                    dt.Columns.Add((DateTime.Today.Year - i).ToString(), typeof(int));
+                }
+
+                dt.Rows.Add(dt.NewRow());
+
+            }
+
+            this.grdAUM.DataSource = dt;
+
+            for (int i = 1; i <= 5; i++)
+            {
+                this.grdAUM.Columns[(DateTime.Today.Year - i).ToString()].DisplayIndex = i - 1;
+            }
+
+        }
+
+        private void LoadClientBreakdown(JsonElement element)
+        {
+            bool hasData = element.TryGetProperty("clientBreakdown", out element);
+
+            DataTable dt = new DataTable();
+
+            if (hasData == true)
+            {
+                dt = Utility.Json2Table(element);
+            }
+            else
+            {
+
+                for (int i = 1; i <= 5; i++)
+                {
+                    dt.Columns.Add((DateTime.Today.Year - i).ToString(), typeof(int));
+                }
+
+                dt.Columns.Add("type", typeof(string));
+
+                DataRow row = dt.NewRow();
+                row.SetField("type", "Instituional");
+                dt.Rows.Add(row);
+                
+                row = dt.NewRow();
+                row.SetField("type", "Retail");
+                dt.Rows.Add(row);
+
+            }
+
+            this.grdClientBreakdown.DataSource = dt;
+
+            this.grdClientBreakdown.Columns["type"].HeaderText = "Client Type";
+            this.grdClientBreakdown.Columns["type"].DisplayIndex = 0;
+
+            for (int i = 1; i <= 5; i++)
+            {
+                this.grdClientBreakdown.Columns[(DateTime.Today.Year - i).ToString()].DisplayIndex = i;
+            }
+
+        }
+
+        private void btnSaveCompany_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                // 数据对象
+                var textData = new
+                {
+                    foundingDate = this.dtpIncepionDate.Value.Date.ToString("yyyy-MM-dd"),
+                    detailOfAcquired = this.txtDetailOfAcquired.Text.Trim(),
+                    parentCompanyName = this.txtParentCompanyName.Text.Trim(),
+                    acqusition = Utility.DataTable2List((DataTable)this.grdAcquisiton.DataSource),
+
+                    supportFromParent = new
+                    {
+                        financial = this.chkSupportFinancial.Checked,
+                        sales = this.chkSupportSales.Checked,
+                        marketing = this.chkSupportMarketing.Checked,
+                        technical = this.chkSupportTechnical.Checked,
+                        personnel = this.chkSupportPersonnel.Checked
+                    },
+
+                    financialData = Utility.DataTable2List((DataTable)this.grdFinancialData.DataSource),
+
+                    creditRating = Utility.DataTable2List((DataTable)this.grdCreditRating.DataSource),
+
+                    aum = Utility.DataTable2List((DataTable)this.grdAUM.DataSource),
+
+                    clientBreakdown = Utility.DataTable2List((DataTable) this.grdClientBreakdown.DataSource),
+
+                    updateTime = DateTime.Now
+                };
+
+                // 序列化选项
+                var options = new JsonSerializerOptions
+                {
+                    WriteIndented = true,
+                    PropertyNamingPolicy = JsonNamingPolicy.CamelCase
+                };
+
+                string jsonString = JsonSerializer.Serialize(textData, options);
+
+                int ret = DataAccess.Set_dd_company_info(this.companyId, DateTime.Today, jsonString, 1, 1, this.userId);
+
+                if (ret == 1)
+                {
+                    MessageBox.Show("Data is saved successfully", "Information");
+                }
+
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Error: {ex.Message}", "Error");
+            }
+        }
     }
 }

+ 3 - 0
DDQ.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="agent.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 60 - 0
DataAccess.cs

@@ -212,5 +212,65 @@ namespace ddq
 
             return ret;
         }
+
+        public static DataTable Get_dd_company_info(string companyId, DateTime? effectiveDate, int isLatest)
+        {
+            MySqlConnection connection = new MySqlConnection(connectionString);
+            MySqlDataAdapter ad = new MySqlDataAdapter("sp_dd_get_company_info", connection);
+
+            MySqlParameter i_company_id = new MySqlParameter("i_company_id", companyId);
+            MySqlParameter i_effective_date = new MySqlParameter("i_effective_date", effectiveDate);
+            MySqlParameter i_is_latest = new MySqlParameter("i_is_latest", isLatest);
+
+            ad.SelectCommand.Parameters.Add(i_company_id);
+            ad.SelectCommand.Parameters.Add(i_effective_date);
+            ad.SelectCommand.Parameters.Add(i_is_latest);
+            ad.SelectCommand.CommandType = CommandType.StoredProcedure;
+
+            DataTable dt = new DataTable();
+            ad.Fill(dt);
+
+            connection.Close();
+
+            return dt;
+
+        }
+
+        public static int Set_dd_company_info(string companyId, DateTime effectiveDate, string info, int status, int isValid, int userId)
+        {
+            int ret = -1;
+
+            using (MySqlConnection connection = new MySqlConnection(connectionString))
+            {
+
+                connection.Open();
+
+                MySqlCommand cmd = new MySqlCommand("sp_dd_set_company_info", connection);
+
+                MySqlParameter i_company_id = new MySqlParameter("i_company_id", companyId);
+                MySqlParameter i_effective_date = new MySqlParameter("i_effective_date", effectiveDate);
+                MySqlParameter i_info = new MySqlParameter("i_info", info);
+                MySqlParameter i_status = new MySqlParameter("i_status", status);
+                MySqlParameter i_isvalid = new MySqlParameter("i_isvalid", isValid);
+                MySqlParameter i_userid = new MySqlParameter("i_userid", userId);
+
+                cmd.Parameters.Add(i_company_id);
+                cmd.Parameters.Add(i_effective_date);
+                cmd.Parameters.Add(i_info);
+                cmd.Parameters.Add(i_status);
+                cmd.Parameters.Add(i_isvalid);
+                cmd.Parameters.Add(i_userid);
+
+                cmd.CommandType = CommandType.StoredProcedure;
+
+                cmd.Connection = connection;
+                cmd.ExecuteNonQuery();
+
+                ret = 1;
+            }
+
+            return ret;
+        }
+
     }
 }

+ 7 - 8
FundQ.Designer.cs

@@ -657,11 +657,10 @@
             // 
             // 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(925, 260);
+            this.btnUploadProcessDiagram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnUploadProcessDiagram.Location = new System.Drawing.Point(900, 260);
             this.btnUploadProcessDiagram.Name = "btnUploadProcessDiagram";
-            this.btnUploadProcessDiagram.Size = new System.Drawing.Size(54, 23);
+            this.btnUploadProcessDiagram.Size = new System.Drawing.Size(79, 23);
             this.btnUploadProcessDiagram.TabIndex = 3;
             this.btnUploadProcessDiagram.Text = "Upload";
             this.btnUploadProcessDiagram.UseVisualStyleBackColor = true;
@@ -669,11 +668,11 @@
             // 
             // 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(816, 260);
+            this.btnDeleteProcessDiagram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnDeleteProcessDiagram.Enabled = false;
+            this.btnDeleteProcessDiagram.Location = new System.Drawing.Point(803, 260);
             this.btnDeleteProcessDiagram.Name = "btnDeleteProcessDiagram";
-            this.btnDeleteProcessDiagram.Size = new System.Drawing.Size(54, 23);
+            this.btnDeleteProcessDiagram.Size = new System.Drawing.Size(74, 23);
             this.btnDeleteProcessDiagram.TabIndex = 2;
             this.btnDeleteProcessDiagram.Text = "Delete";
             this.btnDeleteProcessDiagram.UseVisualStyleBackColor = true;

+ 18 - 0
FundQ.cs

@@ -73,6 +73,14 @@ namespace ddq
                     this.txtInvestmentObjective.Text = Utility.Json2Text(root, "investmentObjective");
                     this.txtBenchmark.Text = Utility.Json2Text(root, "benchmark");
                     this.txtInvestmentPhilosophy.Text = Utility.Json2Text(root, "investmentPhilosophy");
+                    this.txtManagementFee.Text = Utility.Json2Text(root, "managementFee");
+                    this.txtSubscriptionFee.Text = Utility.Json2Text(root, "subscriptionFee");
+                    this.txtRedemptionFee.Text = Utility.Json2Text(root, "redemptionFee");
+                    this.txtAdministrationFee.Text = Utility.Json2Text(root, "administrationFee");
+                    this.txtSwitchingFee.Text = Utility.Json2Text(root, "switchingFee");
+                    this.txtTrusteeFee.Text = Utility.Json2Text(root, "trusteeFee");
+                    this.txtPerformanceFee.Text = Utility.Json2Text(root, "performanceFee");
+                    this.txtPolicyOfClosingFund.Text = Utility.Json2Text(root, "policyOfClosingFund");
 
                     JsonElement elmPM;
                     hasPM = root.TryGetProperty("portfolioManagers", out elmPM);
@@ -196,11 +204,21 @@ namespace ddq
                 var textData = new
                 {
                     fundId = this.fundId,
+                    // -- General Info --
                     investmentObjective = this.txtInvestmentObjective.Text,
                     benchmark = this.txtBenchmark.Text,
                     investmentPhilosophy = this.txtInvestmentPhilosophy.Text,
                     portfolioManagers = Utility.DataTable2List((DataTable)this.grdPortfolioManager.DataSource),
                     ter = Utility.DataTable2List((DataTable)this.grdTER.DataSource),
+                    managementFee = this.txtManagementFee.Text,
+                    subscriptionFee = this.txtSubscriptionFee.Text,
+                    redemptionFee = this.txtRedemptionFee.Text,
+                    administrationFee = this.txtAdministrationFee.Text,
+                    switchingFee = this.txtSwitchingFee.Text,
+                    trusteeFee = this.txtTrusteeFee.Text,
+                    performanceFee = this.txtPerformanceFee.Text,
+                    policyOfClosingFund = this.txtPolicyOfClosingFund.Text,
+                    // -- Process --
                     allowDerivatives = this.chkAllowDerivatives.Checked,
                     useDerivatives = this.chkUseDerivatives.Checked,
                     drvForEffPM = this.chkDerivativesForEfficent.Checked,

+ 21 - 0
Utility.cs

@@ -49,6 +49,24 @@ namespace ddq
             return str;
         }
 
+        public static bool Json2Boolean(JsonElement jsonElement, string propertyName)
+        {
+            bool ret = false;
+            JsonElement elm;
+
+            if (propertyName == null) return ret;
+
+            bool hasProperty = jsonElement.TryGetProperty(propertyName, out elm);
+
+            if (hasProperty == true && elm.ValueKind != JsonValueKind.Undefined)
+            {
+                ret = (elm.ValueKind == JsonValueKind.True);
+            }
+
+            return ret;
+        }
+
+
         public static DataTable Json2Table(JsonElement jsonElement)
         {
             DataTable dataTable = new DataTable();
@@ -85,6 +103,9 @@ namespace ddq
 
         public static List<Dictionary<string, object>> DataTable2List(DataTable dataTable)
         {
+
+            if (dataTable == null) return null;
+
             var records = new List<Dictionary<string, object>>();
 
             foreach (DataRow row in dataTable.Rows)