Jelajahi Sumber

Change json data structure to supoort update information

Joey 18 jam lalu
induk
melakukan
b5726df73a
5 mengubah file dengan 671 tambahan dan 91 penghapusan
  1. 137 2
      DDQ.Designer.cs
  2. 158 47
      DDQ.cs
  3. 209 15
      FundQ.Designer.cs
  4. 36 21
      PersonnelQ.Designer.cs
  5. 131 6
      Utility.cs

+ 137 - 2
DDQ.Designer.cs

@@ -85,6 +85,15 @@
             this.chkSupportPersonnel = new System.Windows.Forms.CheckBox();
             this.agent = new System.Windows.Forms.DataGridViewComboBoxColumn();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.tspInceptionDate = new System.Windows.Forms.Label();
+            this.tspAcqusition = new System.Windows.Forms.Label();
+            this.tspDetailOfAcquired = new System.Windows.Forms.Label();
+            this.tspParentCompanyName = new System.Windows.Forms.Label();
+            this.tspSupportFromParent = new System.Windows.Forms.Label();
+            this.tspFinancialData = new System.Windows.Forms.Label();
+            this.tspCreditRating = new System.Windows.Forms.Label();
+            this.tspAUM = new System.Windows.Forms.Label();
+            this.tspClientBreakdown = new System.Windows.Forms.Label();
             this.tbcMain.SuspendLayout();
             this.tabRequests.SuspendLayout();
             this.panRequests.SuspendLayout();
@@ -463,6 +472,15 @@
             // panel1
             // 
             this.panel1.AutoScroll = true;
+            this.panel1.Controls.Add(this.tspClientBreakdown);
+            this.panel1.Controls.Add(this.tspAUM);
+            this.panel1.Controls.Add(this.tspCreditRating);
+            this.panel1.Controls.Add(this.tspFinancialData);
+            this.panel1.Controls.Add(this.tspSupportFromParent);
+            this.panel1.Controls.Add(this.tspParentCompanyName);
+            this.panel1.Controls.Add(this.tspDetailOfAcquired);
+            this.panel1.Controls.Add(this.tspAcqusition);
+            this.panel1.Controls.Add(this.tspInceptionDate);
             this.panel1.Controls.Add(this.pictureBox1);
             this.panel1.Controls.Add(this.chkSupportPersonnel);
             this.panel1.Controls.Add(this.chkSupportTechnical);
@@ -623,10 +641,10 @@
             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.Size = new System.Drawing.Size(512, 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";
+    "ail";
             // 
             // grdAcquisiton
             // 
@@ -756,6 +774,114 @@
             this.pictureBox1.TabIndex = 27;
             this.pictureBox1.TabStop = false;
             // 
+            // tspInceptionDate
+            // 
+            this.tspInceptionDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspInceptionDate.AutoSize = true;
+            this.tspInceptionDate.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspInceptionDate.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspInceptionDate.Location = new System.Drawing.Point(605, 20);
+            this.tspInceptionDate.Name = "tspInceptionDate";
+            this.tspInceptionDate.Size = new System.Drawing.Size(130, 15);
+            this.tspInceptionDate.TabIndex = 28;
+            this.tspInceptionDate.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspAcqusition
+            // 
+            this.tspAcqusition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspAcqusition.AutoSize = true;
+            this.tspAcqusition.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspAcqusition.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspAcqusition.Location = new System.Drawing.Point(605, 60);
+            this.tspAcqusition.Name = "tspAcqusition";
+            this.tspAcqusition.Size = new System.Drawing.Size(130, 15);
+            this.tspAcqusition.TabIndex = 29;
+            this.tspAcqusition.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspDetailOfAcquired
+            // 
+            this.tspDetailOfAcquired.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspDetailOfAcquired.AutoSize = true;
+            this.tspDetailOfAcquired.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspDetailOfAcquired.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspDetailOfAcquired.Location = new System.Drawing.Point(605, 257);
+            this.tspDetailOfAcquired.Name = "tspDetailOfAcquired";
+            this.tspDetailOfAcquired.Size = new System.Drawing.Size(130, 15);
+            this.tspDetailOfAcquired.TabIndex = 30;
+            this.tspDetailOfAcquired.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspParentCompanyName
+            // 
+            this.tspParentCompanyName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspParentCompanyName.AutoSize = true;
+            this.tspParentCompanyName.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspParentCompanyName.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspParentCompanyName.Location = new System.Drawing.Point(605, 382);
+            this.tspParentCompanyName.Name = "tspParentCompanyName";
+            this.tspParentCompanyName.Size = new System.Drawing.Size(130, 15);
+            this.tspParentCompanyName.TabIndex = 31;
+            this.tspParentCompanyName.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspSupportFromParent
+            // 
+            this.tspSupportFromParent.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspSupportFromParent.AutoSize = true;
+            this.tspSupportFromParent.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspSupportFromParent.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspSupportFromParent.Location = new System.Drawing.Point(605, 431);
+            this.tspSupportFromParent.Name = "tspSupportFromParent";
+            this.tspSupportFromParent.Size = new System.Drawing.Size(130, 15);
+            this.tspSupportFromParent.TabIndex = 32;
+            this.tspSupportFromParent.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspFinancialData
+            // 
+            this.tspFinancialData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspFinancialData.AutoSize = true;
+            this.tspFinancialData.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspFinancialData.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspFinancialData.Location = new System.Drawing.Point(605, 497);
+            this.tspFinancialData.Name = "tspFinancialData";
+            this.tspFinancialData.Size = new System.Drawing.Size(130, 15);
+            this.tspFinancialData.TabIndex = 33;
+            this.tspFinancialData.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspCreditRating
+            // 
+            this.tspCreditRating.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspCreditRating.AutoSize = true;
+            this.tspCreditRating.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspCreditRating.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspCreditRating.Location = new System.Drawing.Point(605, 698);
+            this.tspCreditRating.Name = "tspCreditRating";
+            this.tspCreditRating.Size = new System.Drawing.Size(130, 15);
+            this.tspCreditRating.TabIndex = 34;
+            this.tspCreditRating.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspAUM
+            // 
+            this.tspAUM.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspAUM.AutoSize = true;
+            this.tspAUM.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspAUM.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspAUM.Location = new System.Drawing.Point(605, 889);
+            this.tspAUM.Name = "tspAUM";
+            this.tspAUM.Size = new System.Drawing.Size(130, 15);
+            this.tspAUM.TabIndex = 35;
+            this.tspAUM.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
+            // tspClientBreakdown
+            // 
+            this.tspClientBreakdown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspClientBreakdown.AutoSize = true;
+            this.tspClientBreakdown.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspClientBreakdown.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspClientBreakdown.Location = new System.Drawing.Point(605, 1002);
+            this.tspClientBreakdown.Name = "tspClientBreakdown";
+            this.tspClientBreakdown.Size = new System.Drawing.Size(130, 15);
+            this.tspClientBreakdown.TabIndex = 36;
+            this.tspClientBreakdown.Text = "yyyy-MM-dd hh-mm-ss";
+            // 
             // frmMain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
@@ -857,6 +983,15 @@
         private System.Windows.Forms.CheckBox chkSupportSales;
         private System.Windows.Forms.DataGridViewComboBoxColumn agent;
         private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.Label tspInceptionDate;
+        private System.Windows.Forms.Label tspParentCompanyName;
+        private System.Windows.Forms.Label tspDetailOfAcquired;
+        private System.Windows.Forms.Label tspAcqusition;
+        private System.Windows.Forms.Label tspFinancialData;
+        private System.Windows.Forms.Label tspSupportFromParent;
+        private System.Windows.Forms.Label tspClientBreakdown;
+        private System.Windows.Forms.Label tspAUM;
+        private System.Windows.Forms.Label tspCreditRating;
     }
 }
 

+ 158 - 47
DDQ.cs

@@ -12,6 +12,9 @@ using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
+using static ddq.DataAccess;
+using static ddq.Utility;
+
 namespace ddq
 {
     public partial class frmMain : Form
@@ -118,8 +121,6 @@ namespace ddq
         }
 
 
-
-
         //
         //  People
         //
@@ -208,11 +209,26 @@ namespace ddq
                     //
                     // General Info
                     //
-                    bool isDate = DateTime.TryParse(Utility.Json2Text(root, "foundingDate"), out DateTime newDate);
-                    if (isDate) this.dtpIncepionDate.Value = newDate.Date;
+                    Utility.DDData dddata = Utility.Json2Text2(root, "foundingDate");
+                    if (dddata != null)
+                    {
+                        bool isDate = DateTime.TryParse(dddata.value.ToString(), out DateTime newDate);
+                        if (isDate)
+                        {
+                            this.dtpIncepionDate.Value = newDate.Date;
+                            this.tspInceptionDate.Text = dddata.updateTime;
+                            this.tspInceptionDate.ForeColor = Utility.IsChangedRecently(dddata.updateTime) ? Color.Red : Color.DarkSlateGray;
+                        }
+                    }
+
+                    this.txtDetailOfAcquired.Text = Utility.Json2Text2(root, "detailOfAcquired").value.ToString();
+                    this.tspDetailOfAcquired.Text = Utility.Json2Text2(root, "detailOfAcquired").updateTime;
+                    this.tspDetailOfAcquired.ForeColor = Utility.IsChangedRecently(this.tspDetailOfAcquired.Text) ? Color.Red : Color.DarkSlateGray;
+
+                    this.txtParentCompanyName.Text = Utility.Json2Text2(root, "parentCompanyName").value.ToString();
+                    this.tspParentCompanyName.Text = Utility.Json2Text2(root, "parentCompanyName").updateTime;
+                    this.tspParentCompanyName.ForeColor = Utility.IsChangedRecently(this.tspParentCompanyName.Text) ? Color.Red : Color.DarkSlateGray;
 
-                    this.txtDetailOfAcquired.Text = Utility.Json2Text(root, "detailOfAcquired");
-                    this.txtParentCompanyName.Text = Utility.Json2Text(root, "parentCompanyName");
 
                     LoadAcqusitionGrid(root);
 
@@ -225,20 +241,34 @@ namespace ddq
                     LoadCompanyAUM(root);
 
                     LoadClientBreakdown(root);
+
                 }
             }
         }
 
-        private void LoadAcqusitionGrid(JsonElement element)
+        private void LoadAcqusitionGrid(JsonElement jsonElement)
         {
 
-            bool hasData = element.TryGetProperty("acqusition", out element);
+            bool hasData = jsonElement.TryGetProperty("acqusition", out JsonElement element);
+
+            string strUpdateTime = "";
+
+            if (hasData == true)
+                hasData &= element.TryGetProperty("v", out JsonElement elm);
 
             DataTable dt = new DataTable();
 
             if (hasData == true)
             {
-                dt = Utility.Json2Table(element);
+                Utility.DDData dddata = Utility.Json2Table2(element);
+
+                if (dddata != null)
+                {
+                    dt = (DataTable)dddata.value;
+
+                    strUpdateTime = dddata.updateTime;
+                }
+
             } else
             {
                 dt.Columns.Add("date", typeof(string));
@@ -253,33 +283,66 @@ namespace ddq
 
             this.grdAcquisiton.Columns["action"].HeaderText = "Event";
             this.grdAcquisiton.Columns["action"].DisplayIndex = 1;
+
+            this.tspAcqusition.Text = strUpdateTime;
+            this.tspAcqusition.ForeColor = Utility.IsChangedRecently(strUpdateTime) ? Color.Red : Color.DarkSlateGray;
+
         }
 
 
-        private void LoadSupportFromParentCompany(JsonElement element)
+        private void LoadSupportFromParentCompany(JsonElement jsonElement)
         {
 
-            bool hasData = element.TryGetProperty("supportFromParent", out element);
+            bool hasData = jsonElement.TryGetProperty("supportFromParent", out JsonElement element);
+
+            string strUpdateTime = "";
+
+            JsonElement elm = new JsonElement();
+
+            if (hasData == true)
+                hasData &= element.TryGetProperty("v", out elm);
 
-            if (hasData == false) return;
+            if (hasData == true)
+            {
 
-            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");
+                this.chkSupportFinancial.Checked = Utility.Json2Boolean(elm, "financial");
+                this.chkSupportSales.Checked = Utility.Json2Boolean(elm, "sales");
+                this.chkSupportMarketing.Checked = Utility.Json2Boolean(elm, "marketing"); ;
+                this.chkSupportTechnical.Checked = Utility.Json2Boolean(elm, "technical"); ;
+                this.chkSupportPersonnel.Checked = Utility.Json2Boolean(elm, "personnel");
+
+                hasData = element.TryGetProperty("t", out elm);
+                if (hasData == true)
+                    strUpdateTime = elm.ToString();
+            }
+
+            this.tspSupportFromParent.Text = strUpdateTime;
+            this.tspSupportFromParent.ForeColor = Utility.IsChangedRecently(strUpdateTime) ? Color.Red : Color.DarkSlateGray;
 
         }
 
-        private void LoadFinancialData(JsonElement element)
+        private void LoadFinancialData(JsonElement jsonElement)
         {
-            bool hasData = element.TryGetProperty("financialData", out element);
+            bool hasData = jsonElement.TryGetProperty("financialData", out JsonElement element);
+
+            string strUpdateTime = "";
+
+            if (hasData == true)
+                hasData &= element.TryGetProperty("v", out JsonElement elm);
 
             DataTable dt = new DataTable();
 
             if (hasData == true)
             {
-                dt = Utility.Json2Table(element);
+
+                Utility.DDData dddata = Utility.Json2Table2(element);
+
+                if (dddata != null)
+                {
+                    dt = (DataTable)dddata.value;
+
+                    strUpdateTime = dddata.updateTime;
+                }
             }
             else
             {
@@ -314,17 +377,32 @@ namespace ddq
             this.grdFinancialData.Columns["interestCoverageRatio"].DefaultCellStyle.Format = "N2";
             this.grdFinancialData.Columns["interestCoverageRatio"].DisplayIndex = 3;
 
+            this.tspFinancialData.Text = strUpdateTime;
+            this.tspFinancialData.ForeColor = Utility.IsChangedRecently(strUpdateTime) ? Color.Red : Color.DarkSlateGray;
+
         }
 
-        private void LoadCreditRating(JsonElement element)
+        private void LoadCreditRating(JsonElement jsonElement)
         {
-            bool hasData = element.TryGetProperty("creditRating", out element);
+            bool hasData = jsonElement.TryGetProperty("creditRating", out JsonElement element);
+
+            string strUpdateTime = "";
+
+            if (hasData == true)
+                hasData &= element.TryGetProperty("v", out JsonElement elm);
 
             DataTable dt = new DataTable();
 
             if (hasData == true)
             {
-                dt = Utility.Json2Table(element);
+                Utility.DDData dddata = Utility.Json2Table2(element);
+
+                if (dddata != null)
+                {
+                    dt = (DataTable)dddata.value;
+
+                    strUpdateTime = dddata.updateTime;
+                }
             }
             else
             {
@@ -364,17 +442,31 @@ namespace ddq
             this.grdCreditRating.Columns["preferred"].HeaderText = "Preferred Stock";
             this.grdCreditRating.Columns["preferred"].DisplayIndex = 7;
 
+            this.tspCreditRating.Text = strUpdateTime;
+            this.tspCreditRating.ForeColor = Utility.IsChangedRecently(strUpdateTime) ? Color.Red : Color.DarkSlateGray;
         }
 
-        private void LoadCompanyAUM(JsonElement element)
+        private void LoadCompanyAUM(JsonElement jsonElement)
         {
-            bool hasData = element.TryGetProperty("aum", out element);
+            bool hasData = jsonElement.TryGetProperty("aum", out JsonElement element);
+
+            string strUpdateTime = "";
+
+            if (hasData == true)
+                hasData &= element.TryGetProperty("v", out JsonElement elm);
 
             DataTable dt = new DataTable();
 
             if (hasData == true)
             {
-                dt = Utility.Json2Table(element);
+                Utility.DDData dddata = Utility.Json2Table2(element);
+
+                if (dddata != null)
+                {
+                    dt = (DataTable)dddata.value;
+
+                    strUpdateTime = dddata.updateTime;
+                }
             }
             else
             {
@@ -394,17 +486,31 @@ namespace ddq
                 this.grdAUM.Columns[(DateTime.Today.Year - i).ToString()].DisplayIndex = i - 1;
             }
 
+            this.tspAUM.Text = strUpdateTime;
+            this.tspAUM.ForeColor = Utility.IsChangedRecently(strUpdateTime) ? Color.Red : Color.DarkSlateGray;
         }
 
-        private void LoadClientBreakdown(JsonElement element)
+        private void LoadClientBreakdown(JsonElement jsonElement)
         {
-            bool hasData = element.TryGetProperty("clientBreakdown", out element);
+            bool hasData = jsonElement.TryGetProperty("clientBreakdown", out JsonElement element);
+
+            string strUpdateTime = "";
+
+            if (hasData == true)
+                hasData &= element.TryGetProperty("v", out JsonElement elm);
 
             DataTable dt = new DataTable();
 
             if (hasData == true)
             {
-                dt = Utility.Json2Table(element);
+                Utility.DDData dddata = Utility.Json2Table2(element);
+
+                if (dddata != null)
+                {
+                    dt = (DataTable)dddata.value;
+
+                    strUpdateTime = dddata.updateTime;
+                }
             }
             else
             {
@@ -436,38 +542,43 @@ namespace ddq
                 this.grdClientBreakdown.Columns[(DateTime.Today.Year - i).ToString()].DisplayIndex = i;
             }
 
+            this.tspClientBreakdown.Text = strUpdateTime;
+            this.tspClientBreakdown.ForeColor = Utility.IsChangedRecently(strUpdateTime) ? Color.Red : Color.DarkSlateGray;
+
         }
 
         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
-                    },
+                    foundingDate = Utility.AddInfo(this.dtpIncepionDate.Value.Date.ToString("yyyy-MM-dd"), userId),
+                    detailOfAcquired = Utility.AddInfo(this.txtDetailOfAcquired.Text.Trim(), userId),
+                    parentCompanyName = Utility.AddInfo(this.txtParentCompanyName.Text.Trim(), userId),
 
-                    financialData = Utility.DataTable2List((DataTable)this.grdFinancialData.DataSource),
+                    acqusition = Utility.AddInfo(Utility.DataTable2List((DataTable)this.grdAcquisiton.DataSource), userId),
+                    
+                    supportFromParent = Utility.AddInfo(new 
+                        {
+                            financial = this.chkSupportFinancial.Checked,
+                            sales = this.chkSupportSales.Checked,
+                            marketing = this.chkSupportMarketing.Checked,
+                            technical = this.chkSupportTechnical.Checked,
+                            personnel = this.chkSupportPersonnel.Checked
+                        }, userId),
 
-                    creditRating = Utility.DataTable2List((DataTable)this.grdCreditRating.DataSource),
+                    financialData = Utility.AddInfo(Utility.DataTable2List((DataTable)this.grdFinancialData.DataSource), userId),
 
-                    aum = Utility.DataTable2List((DataTable)this.grdAUM.DataSource),
+                    creditRating = Utility.AddInfo(Utility.DataTable2List((DataTable)this.grdCreditRating.DataSource), userId),
 
-                    clientBreakdown = Utility.DataTable2List((DataTable) this.grdClientBreakdown.DataSource),
+                    aum = Utility.AddInfo(Utility.DataTable2List((DataTable)this.grdAUM.DataSource), userId),
 
-                    updateTime = DateTime.Now
+                    clientBreakdown = Utility.AddInfo(Utility.DataTable2List((DataTable) this.grdClientBreakdown.DataSource), userId)
+  
                 };
 
                 // 序列化选项

+ 209 - 15
FundQ.Designer.cs

@@ -88,6 +88,19 @@
             this.tabOwnership = new System.Windows.Forms.TabPage();
             this.tabPerformance = new System.Windows.Forms.TabPage();
             this.ofdProcessDiagram = new System.Windows.Forms.OpenFileDialog();
+            this.tspInvestmentObjective = new System.Windows.Forms.Label();
+            this.tspBenchmark = new System.Windows.Forms.Label();
+            this.tspInvestmentPhilosophy = new System.Windows.Forms.Label();
+            this.tspPortfolioManager = new System.Windows.Forms.Label();
+            this.tspTER = new System.Windows.Forms.Label();
+            this.tspCurrentFee = new System.Windows.Forms.Label();
+            this.tspPolicyOfClosingFund = new System.Windows.Forms.Label();
+            this.tspFundProcess = new System.Windows.Forms.Label();
+            this.tspAllowDerivatives = new System.Windows.Forms.Label();
+            this.tspUseDerivatives = new System.Windows.Forms.Label();
+            this.tspDerivatesFor = new System.Windows.Forms.Label();
+            this.tspPriceTarget = new System.Windows.Forms.Label();
+            this.tspOverrunPriceTarget = new System.Windows.Forms.Label();
             this.panStaticData.SuspendLayout();
             this.tbcFund.SuspendLayout();
             this.tabGeneralInfo.SuspendLayout();
@@ -205,6 +218,13 @@
             // 
             this.panGeneralInfoMain.AutoScroll = true;
             this.panGeneralInfoMain.BackColor = System.Drawing.Color.Transparent;
+            this.panGeneralInfoMain.Controls.Add(this.tspPolicyOfClosingFund);
+            this.panGeneralInfoMain.Controls.Add(this.tspCurrentFee);
+            this.panGeneralInfoMain.Controls.Add(this.tspTER);
+            this.panGeneralInfoMain.Controls.Add(this.tspPortfolioManager);
+            this.panGeneralInfoMain.Controls.Add(this.tspInvestmentPhilosophy);
+            this.panGeneralInfoMain.Controls.Add(this.tspBenchmark);
+            this.panGeneralInfoMain.Controls.Add(this.tspInvestmentObjective);
             this.panGeneralInfoMain.Controls.Add(this.btnAddManager);
             this.panGeneralInfoMain.Controls.Add(this.label16);
             this.panGeneralInfoMain.Controls.Add(this.txtPolicyOfClosingFund);
@@ -228,12 +248,11 @@
             // 
             // btnAddManager
             // 
-            this.btnAddManager.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnAddManager.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnAddManager.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.btnAddManager.Location = new System.Drawing.Point(839, 369);
             this.btnAddManager.Name = "btnAddManager";
-            this.btnAddManager.Size = new System.Drawing.Size(141, 23);
+            this.btnAddManager.Size = new System.Drawing.Size(124, 23);
             this.btnAddManager.TabIndex = 15;
             this.btnAddManager.Text = "Add a manager";
             this.btnAddManager.UseVisualStyleBackColor = true;
@@ -254,7 +273,7 @@
             this.txtPolicyOfClosingFund.Location = new System.Drawing.Point(24, 779);
             this.txtPolicyOfClosingFund.Multiline = true;
             this.txtPolicyOfClosingFund.Name = "txtPolicyOfClosingFund";
-            this.txtPolicyOfClosingFund.Size = new System.Drawing.Size(956, 79);
+            this.txtPolicyOfClosingFund.Size = new System.Drawing.Size(939, 79);
             this.txtPolicyOfClosingFund.TabIndex = 12;
             // 
             // label14
@@ -299,7 +318,7 @@
             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(610, 218);
+            this.grbFees.Size = new System.Drawing.Size(593, 218);
             this.grbFees.TabIndex = 9;
             this.grbFees.TabStop = false;
             this.grbFees.Text = "Current Fees %";
@@ -437,7 +456,7 @@
             this.grdPortfolioManager.MultiSelect = false;
             this.grdPortfolioManager.Name = "grdPortfolioManager";
             this.grdPortfolioManager.RowTemplate.Height = 23;
-            this.grdPortfolioManager.Size = new System.Drawing.Size(956, 85);
+            this.grdPortfolioManager.Size = new System.Drawing.Size(939, 85);
             this.grdPortfolioManager.TabIndex = 7;
             this.grdPortfolioManager.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.grdPortfolioManager_CellValidating);
             this.grdPortfolioManager.Validating += new System.ComponentModel.CancelEventHandler(this.grdPortfolioManager_Validating);
@@ -458,7 +477,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(956, 95);
+            this.txtInvestmentPhilosophy.Size = new System.Drawing.Size(939, 95);
             this.txtInvestmentPhilosophy.TabIndex = 5;
             // 
             // txtBenchmark
@@ -468,7 +487,7 @@
             this.txtBenchmark.Location = new System.Drawing.Point(24, 179);
             this.txtBenchmark.MaxLength = 260;
             this.txtBenchmark.Name = "txtBenchmark";
-            this.txtBenchmark.Size = new System.Drawing.Size(956, 26);
+            this.txtBenchmark.Size = new System.Drawing.Size(939, 26);
             this.txtBenchmark.TabIndex = 4;
             // 
             // label3
@@ -496,7 +515,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(956, 95);
+            this.txtInvestmentObjective.Size = new System.Drawing.Size(939, 95);
             this.txtInvestmentObjective.TabIndex = 1;
             // 
             // label1
@@ -523,6 +542,12 @@
             // panel2
             // 
             this.panel2.AutoScroll = true;
+            this.panel2.Controls.Add(this.tspOverrunPriceTarget);
+            this.panel2.Controls.Add(this.tspPriceTarget);
+            this.panel2.Controls.Add(this.tspDerivatesFor);
+            this.panel2.Controls.Add(this.tspUseDerivatives);
+            this.panel2.Controls.Add(this.tspAllowDerivatives);
+            this.panel2.Controls.Add(this.tspFundProcess);
             this.panel2.Controls.Add(this.label18);
             this.panel2.Controls.Add(this.txtOverrunPriceTarget);
             this.panel2.Controls.Add(this.label17);
@@ -560,7 +585,7 @@
             this.txtOverrunPriceTarget.Location = new System.Drawing.Point(18, 566);
             this.txtOverrunPriceTarget.Multiline = true;
             this.txtOverrunPriceTarget.Name = "txtOverrunPriceTarget";
-            this.txtOverrunPriceTarget.Size = new System.Drawing.Size(961, 56);
+            this.txtOverrunPriceTarget.Size = new System.Drawing.Size(944, 56);
             this.txtOverrunPriceTarget.TabIndex = 14;
             // 
             // label17
@@ -658,7 +683,7 @@
             // btnUploadProcessDiagram
             // 
             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.Location = new System.Drawing.Point(883, 260);
             this.btnUploadProcessDiagram.Name = "btnUploadProcessDiagram";
             this.btnUploadProcessDiagram.Size = new System.Drawing.Size(79, 23);
             this.btnUploadProcessDiagram.TabIndex = 3;
@@ -670,7 +695,7 @@
             // 
             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.Location = new System.Drawing.Point(786, 260);
             this.btnDeleteProcessDiagram.Name = "btnDeleteProcessDiagram";
             this.btnDeleteProcessDiagram.Size = new System.Drawing.Size(74, 23);
             this.btnDeleteProcessDiagram.TabIndex = 2;
@@ -684,7 +709,7 @@
             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(961, 218);
+            this.picFundProcess.Size = new System.Drawing.Size(944, 218);
             this.picFundProcess.TabIndex = 1;
             this.picFundProcess.TabStop = false;
             // 
@@ -693,10 +718,10 @@
             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.Size = new System.Drawing.Size(757, 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";
+    "efficiencies and your buy/sell disciplines";
             // 
             // tabRisk
             // 
@@ -729,6 +754,162 @@
             // 
             this.ofdProcessDiagram.FileName = "*.png";
             // 
+            // tspInvestmentObjective
+            // 
+            this.tspInvestmentObjective.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspInvestmentObjective.AutoSize = true;
+            this.tspInvestmentObjective.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspInvestmentObjective.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspInvestmentObjective.Location = new System.Drawing.Point(836, 20);
+            this.tspInvestmentObjective.Name = "tspInvestmentObjective";
+            this.tspInvestmentObjective.Size = new System.Drawing.Size(128, 15);
+            this.tspInvestmentObjective.TabIndex = 29;
+            this.tspInvestmentObjective.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspBenchmark
+            // 
+            this.tspBenchmark.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspBenchmark.AutoSize = true;
+            this.tspBenchmark.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspBenchmark.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspBenchmark.Location = new System.Drawing.Point(836, 161);
+            this.tspBenchmark.Name = "tspBenchmark";
+            this.tspBenchmark.Size = new System.Drawing.Size(128, 15);
+            this.tspBenchmark.TabIndex = 30;
+            this.tspBenchmark.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspInvestmentPhilosophy
+            // 
+            this.tspInvestmentPhilosophy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspInvestmentPhilosophy.AutoSize = true;
+            this.tspInvestmentPhilosophy.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspInvestmentPhilosophy.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspInvestmentPhilosophy.Location = new System.Drawing.Point(835, 236);
+            this.tspInvestmentPhilosophy.Name = "tspInvestmentPhilosophy";
+            this.tspInvestmentPhilosophy.Size = new System.Drawing.Size(128, 15);
+            this.tspInvestmentPhilosophy.TabIndex = 31;
+            this.tspInvestmentPhilosophy.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspPortfolioManager
+            // 
+            this.tspPortfolioManager.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspPortfolioManager.AutoSize = true;
+            this.tspPortfolioManager.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspPortfolioManager.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspPortfolioManager.Location = new System.Drawing.Point(705, 377);
+            this.tspPortfolioManager.Name = "tspPortfolioManager";
+            this.tspPortfolioManager.Size = new System.Drawing.Size(128, 15);
+            this.tspPortfolioManager.TabIndex = 32;
+            this.tspPortfolioManager.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspTER
+            // 
+            this.tspTER.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspTER.AutoSize = true;
+            this.tspTER.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspTER.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspTER.Location = new System.Drawing.Point(236, 510);
+            this.tspTER.Name = "tspTER";
+            this.tspTER.Size = new System.Drawing.Size(128, 15);
+            this.tspTER.TabIndex = 33;
+            this.tspTER.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspCurrentFee
+            // 
+            this.tspCurrentFee.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspCurrentFee.AutoSize = true;
+            this.tspCurrentFee.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspCurrentFee.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspCurrentFee.Location = new System.Drawing.Point(835, 510);
+            this.tspCurrentFee.Name = "tspCurrentFee";
+            this.tspCurrentFee.Size = new System.Drawing.Size(128, 15);
+            this.tspCurrentFee.TabIndex = 34;
+            this.tspCurrentFee.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspPolicyOfClosingFund
+            // 
+            this.tspPolicyOfClosingFund.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspPolicyOfClosingFund.AutoSize = true;
+            this.tspPolicyOfClosingFund.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspPolicyOfClosingFund.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspPolicyOfClosingFund.Location = new System.Drawing.Point(836, 759);
+            this.tspPolicyOfClosingFund.Name = "tspPolicyOfClosingFund";
+            this.tspPolicyOfClosingFund.Size = new System.Drawing.Size(128, 15);
+            this.tspPolicyOfClosingFund.TabIndex = 35;
+            this.tspPolicyOfClosingFund.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspFundProcess
+            // 
+            this.tspFundProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspFundProcess.AutoSize = true;
+            this.tspFundProcess.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspFundProcess.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspFundProcess.Location = new System.Drawing.Point(834, 18);
+            this.tspFundProcess.Name = "tspFundProcess";
+            this.tspFundProcess.Size = new System.Drawing.Size(128, 15);
+            this.tspFundProcess.TabIndex = 30;
+            this.tspFundProcess.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspAllowDerivatives
+            // 
+            this.tspAllowDerivatives.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspAllowDerivatives.AutoSize = true;
+            this.tspAllowDerivatives.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspAllowDerivatives.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspAllowDerivatives.Location = new System.Drawing.Point(834, 307);
+            this.tspAllowDerivatives.Name = "tspAllowDerivatives";
+            this.tspAllowDerivatives.Size = new System.Drawing.Size(128, 15);
+            this.tspAllowDerivatives.TabIndex = 31;
+            this.tspAllowDerivatives.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspUseDerivatives
+            // 
+            this.tspUseDerivatives.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspUseDerivatives.AutoSize = true;
+            this.tspUseDerivatives.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspUseDerivatives.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspUseDerivatives.Location = new System.Drawing.Point(834, 349);
+            this.tspUseDerivatives.Name = "tspUseDerivatives";
+            this.tspUseDerivatives.Size = new System.Drawing.Size(128, 15);
+            this.tspUseDerivatives.TabIndex = 32;
+            this.tspUseDerivatives.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspDerivatesFor
+            // 
+            this.tspDerivatesFor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspDerivatesFor.AutoSize = true;
+            this.tspDerivatesFor.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspDerivatesFor.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspDerivatesFor.Location = new System.Drawing.Point(834, 390);
+            this.tspDerivatesFor.Name = "tspDerivatesFor";
+            this.tspDerivatesFor.Size = new System.Drawing.Size(128, 15);
+            this.tspDerivatesFor.TabIndex = 33;
+            this.tspDerivatesFor.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspPriceTarget
+            // 
+            this.tspPriceTarget.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspPriceTarget.AutoSize = true;
+            this.tspPriceTarget.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspPriceTarget.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspPriceTarget.Location = new System.Drawing.Point(834, 513);
+            this.tspPriceTarget.Name = "tspPriceTarget";
+            this.tspPriceTarget.Size = new System.Drawing.Size(128, 15);
+            this.tspPriceTarget.TabIndex = 34;
+            this.tspPriceTarget.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
+            // tspOverrunPriceTarget
+            // 
+            this.tspOverrunPriceTarget.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspOverrunPriceTarget.AutoSize = true;
+            this.tspOverrunPriceTarget.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspOverrunPriceTarget.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspOverrunPriceTarget.Location = new System.Drawing.Point(834, 547);
+            this.tspOverrunPriceTarget.Name = "tspOverrunPriceTarget";
+            this.tspOverrunPriceTarget.Size = new System.Drawing.Size(128, 15);
+            this.tspOverrunPriceTarget.TabIndex = 35;
+            this.tspOverrunPriceTarget.Text = "yyyy-MM-dd hh:mm:ss";
+            // 
             // FundQ
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -821,5 +1002,18 @@
         private System.Windows.Forms.Label label17;
         private System.Windows.Forms.OpenFileDialog ofdProcessDiagram;
         private System.Windows.Forms.Button btnAddManager;
+        private System.Windows.Forms.Label tspInvestmentPhilosophy;
+        private System.Windows.Forms.Label tspBenchmark;
+        private System.Windows.Forms.Label tspInvestmentObjective;
+        private System.Windows.Forms.Label tspPolicyOfClosingFund;
+        private System.Windows.Forms.Label tspCurrentFee;
+        private System.Windows.Forms.Label tspTER;
+        private System.Windows.Forms.Label tspPortfolioManager;
+        private System.Windows.Forms.Label tspFundProcess;
+        private System.Windows.Forms.Label tspOverrunPriceTarget;
+        private System.Windows.Forms.Label tspPriceTarget;
+        private System.Windows.Forms.Label tspDerivatesFor;
+        private System.Windows.Forms.Label tspUseDerivatives;
+        private System.Windows.Forms.Label tspAllowDerivatives;
     }
 }

+ 36 - 21
PersonnelQ.Designer.cs

@@ -31,6 +31,8 @@
             this.label1 = new System.Windows.Forms.Label();
             this.txtName = new System.Windows.Forms.TextBox();
             this.panPersonnelBottom = new System.Windows.Forms.Panel();
+            this.btnDeletePersonnel = new System.Windows.Forms.Button();
+            this.btnSavePersonnel = new System.Windows.Forms.Button();
             this.label2 = new System.Windows.Forms.Label();
             this.cmbRole = new System.Windows.Forms.ComboBox();
             this.label3 = new System.Windows.Forms.Label();
@@ -43,8 +45,7 @@
             this.txtTitle = new System.Windows.Forms.TextBox();
             this.label8 = new System.Windows.Forms.Label();
             this.txtBio = new System.Windows.Forms.TextBox();
-            this.btnSavePersonnel = new System.Windows.Forms.Button();
-            this.btnDeletePersonnel = new System.Windows.Forms.Button();
+            this.tspManagerInfo = new System.Windows.Forms.Label();
             this.panPersonnelBottom.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -77,6 +78,26 @@
             this.panPersonnelBottom.Size = new System.Drawing.Size(600, 46);
             this.panPersonnelBottom.TabIndex = 2;
             // 
+            // btnDeletePersonnel
+            // 
+            this.btnDeletePersonnel.ForeColor = System.Drawing.Color.Red;
+            this.btnDeletePersonnel.Location = new System.Drawing.Point(31, 13);
+            this.btnDeletePersonnel.Name = "btnDeletePersonnel";
+            this.btnDeletePersonnel.Size = new System.Drawing.Size(75, 23);
+            this.btnDeletePersonnel.TabIndex = 1;
+            this.btnDeletePersonnel.Text = "Delete";
+            this.btnDeletePersonnel.UseVisualStyleBackColor = true;
+            // 
+            // btnSavePersonnel
+            // 
+            this.btnSavePersonnel.Location = new System.Drawing.Point(490, 13);
+            this.btnSavePersonnel.Name = "btnSavePersonnel";
+            this.btnSavePersonnel.Size = new System.Drawing.Size(75, 23);
+            this.btnSavePersonnel.TabIndex = 0;
+            this.btnSavePersonnel.Text = "Save";
+            this.btnSavePersonnel.UseVisualStyleBackColor = true;
+            this.btnSavePersonnel.Click += new System.EventHandler(this.btnSavePersonnel_Click);
+            // 
             // label2
             // 
             this.label2.AutoSize = true;
@@ -181,31 +202,24 @@
             this.txtBio.Size = new System.Drawing.Size(383, 296);
             this.txtBio.TabIndex = 13;
             // 
-            // btnSavePersonnel
+            // tspManagerInfo
             // 
-            this.btnSavePersonnel.Location = new System.Drawing.Point(490, 13);
-            this.btnSavePersonnel.Name = "btnSavePersonnel";
-            this.btnSavePersonnel.Size = new System.Drawing.Size(75, 23);
-            this.btnSavePersonnel.TabIndex = 0;
-            this.btnSavePersonnel.Text = "Save";
-            this.btnSavePersonnel.UseVisualStyleBackColor = true;
-            this.btnSavePersonnel.Click += new System.EventHandler(this.btnSavePersonnel_Click);
-            // 
-            // btnDeletePersonnel
-            // 
-            this.btnDeletePersonnel.ForeColor = System.Drawing.Color.Red;
-            this.btnDeletePersonnel.Location = new System.Drawing.Point(31, 13);
-            this.btnDeletePersonnel.Name = "btnDeletePersonnel";
-            this.btnDeletePersonnel.Size = new System.Drawing.Size(75, 23);
-            this.btnDeletePersonnel.TabIndex = 1;
-            this.btnDeletePersonnel.Text = "Delete";
-            this.btnDeletePersonnel.UseVisualStyleBackColor = true;
+            this.tspManagerInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.tspManagerInfo.AutoSize = true;
+            this.tspManagerInfo.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tspManagerInfo.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.tspManagerInfo.Location = new System.Drawing.Point(460, 601);
+            this.tspManagerInfo.Name = "tspManagerInfo";
+            this.tspManagerInfo.Size = new System.Drawing.Size(128, 15);
+            this.tspManagerInfo.TabIndex = 30;
+            this.tspManagerInfo.Text = "yyyy-MM-dd hh:mm:ss";
             // 
             // PersonnelQ
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(600, 675);
+            this.Controls.Add(this.tspManagerInfo);
             this.Controls.Add(this.txtBio);
             this.Controls.Add(this.label8);
             this.Controls.Add(this.txtTitle);
@@ -222,7 +236,7 @@
             this.Controls.Add(this.txtName);
             this.Controls.Add(this.label1);
             this.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.MinimizeBox = false;
             this.Name = "PersonnelQ";
             this.Text = "Personnel Data";
@@ -251,5 +265,6 @@
         private System.Windows.Forms.TextBox txtBio;
         private System.Windows.Forms.Button btnSavePersonnel;
         private System.Windows.Forms.Button btnDeletePersonnel;
+        private System.Windows.Forms.Label tspManagerInfo;
     }
 }

+ 131 - 6
Utility.cs

@@ -26,6 +26,15 @@ namespace ddq
 
         };
 
+        public class DDData
+        {
+            public object value { get; set; }
+
+            public string userId { get; set; }
+
+            public string updateTime { get; set; }
+        };
+
 
         /// <summary>
         /// JsonElment 转为字符串,若输入为空则输出""
@@ -34,19 +43,49 @@ namespace ddq
         /// <returns></returns>
         public static string Json2Text(JsonElement jsonElement, string propertyName)
         {
-            string str = "";
+
+            string ret = null;
+
+            JsonElement elm;
+
+            if (propertyName == null) return ret;
+
+            bool hasProperty = jsonElement.TryGetProperty(propertyName, out elm);
+
+            if (hasProperty == true && elm.ValueKind != JsonValueKind.Undefined)
+            {
+                ret = elm.ToString();
+            }
+
+            return ret;
+        }
+
+        /// <summary>
+        /// JsonElment 转为字符串,若输入为空则输出""
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        public static DDData Json2Text2(JsonElement jsonElement, string propertyName)
+        {
+
+            DDData ret = new DDData();
+
             JsonElement elm;
 
-            if (propertyName == null) return str;
+            if (propertyName == null) return ret;
 
             bool hasProperty = jsonElement.TryGetProperty(propertyName, out elm);
 
             if (hasProperty == true && elm.ValueKind != JsonValueKind.Undefined)
             {
-                str = elm.ToString().Trim();
+
+                ret.value = elm.GetProperty("v").ToString();
+                ret.userId = elm.GetProperty("u").ToString();
+                ret.updateTime = elm.GetProperty("t").ToString();
+                
             }
 
-            return str;
+            return ret;
         }
 
         public static bool Json2Boolean(JsonElement jsonElement, string propertyName)
@@ -69,13 +108,18 @@ namespace ddq
 
         public static DataTable Json2Table(JsonElement jsonElement)
         {
+
+            bool hasData = jsonElement.TryGetProperty("v", out JsonElement elm);
+
+            if (!hasData) return null;
+
             DataTable dataTable = new DataTable();
 
             // 如果解析出的是数组
-            if (jsonElement.ValueKind == JsonValueKind.Array)
+            if (elm.ValueKind == JsonValueKind.Array)
             {
                 // 遍历数组元素
-                foreach (JsonElement element in jsonElement.EnumerateArray())
+                foreach (JsonElement element in elm.EnumerateArray())
                 {
                     // 如果是第一次遍历,元素包含列定义信息,需要创建列
                     if (dataTable.Columns.Count == 0)
@@ -101,6 +145,51 @@ namespace ddq
 
         }
 
+        public static DDData Json2Table2(JsonElement jsonElement)
+        {
+
+            DDData ret = new DDData();
+
+            JsonElement elm = jsonElement.GetProperty("v");
+
+            DataTable dataTable = new DataTable();
+
+            // 如果解析出的是数组
+            if (elm.ValueKind == JsonValueKind.Array)
+            {
+                
+                // 遍历数组元素
+                foreach (JsonElement element in elm.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);
+                }
+            }
+
+            ret.value = dataTable;
+            ret.userId = jsonElement.GetProperty("u").ToString();
+            ret.updateTime = jsonElement.GetProperty("t").ToString();
+
+            return ret;
+
+        }
+
+
         public static List<Dictionary<string, object>> DataTable2List(DataTable dataTable)
         {
 
@@ -121,6 +210,42 @@ namespace ddq
 
             return records;
         }
+
+        public static object AddInfo(object input, int userId)
+        {
+            if (input == null) return null;
+
+            var ret = new
+            {
+                v = input,
+                u = userId,
+                t = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
+            };
+
+            return ret;
+        }
+
+
+        /// <summary>
+        /// 是否在7天内有更新
+        /// </summary>
+        /// <param name="date"></param>
+        /// <returns></returns>
+        public static bool IsChangedRecently(string date)
+        {
+
+            bool ret = false;
+            
+            if (date == null) return ret;
+
+            if (DateTime.TryParse(date, out DateTime newDate))
+            {
+                if (newDate >= DateTime.Now.AddDays(-7)) ret = true;
+            }
+
+            return ret;
+
+        }
     }