Forráskód Böngészése

上传文件至 ''

Joey 3 hete
szülő
commit
232f6d7352
3 módosított fájl, 66 hozzáadás és 7 törlés
  1. 30 5
      UICompany.Designer.cs
  2. 33 2
      UICompany.cs
  3. 3 0
      UICompany.resx

+ 30 - 5
UICompany.Designer.cs

@@ -96,6 +96,8 @@
             this.cmbTaskType = new System.Windows.Forms.ComboBox();
             this.btnAddtTask = new System.Windows.Forms.Button();
             this.ofdUploadFile = new System.Windows.Forms.OpenFileDialog();
+            this.chkIsAuthorized = new System.Windows.Forms.CheckBox();
+            this.btnAuthorizeFunds = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
             this.splitContainer1.Panel1.SuspendLayout();
             this.splitContainer1.Panel2.SuspendLayout();
@@ -252,7 +254,6 @@
             // 
             // btnSaveBasicInfo
             // 
-            this.btnSaveBasicInfo.Enabled = false;
             this.btnSaveBasicInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnSaveBasicInfo.Location = new System.Drawing.Point(660, 84);
             this.btnSaveBasicInfo.Name = "btnSaveBasicInfo";
@@ -721,6 +722,8 @@
             // 
             // groupBox3
             // 
+            this.groupBox3.Controls.Add(this.btnAuthorizeFunds);
+            this.groupBox3.Controls.Add(this.chkIsAuthorized);
             this.groupBox3.Controls.Add(this.clbContactor);
             this.groupBox3.Controls.Add(this.clbCollector);
             this.groupBox3.Controls.Add(this.btnSaveContactor);
@@ -737,7 +740,7 @@
             // 
             this.clbContactor.CheckOnClick = true;
             this.clbContactor.FormattingEnabled = true;
-            this.clbContactor.Location = new System.Drawing.Point(101, 23);
+            this.clbContactor.Location = new System.Drawing.Point(91, 23);
             this.clbContactor.Name = "clbContactor";
             this.clbContactor.Size = new System.Drawing.Size(138, 94);
             this.clbContactor.TabIndex = 6;
@@ -746,14 +749,14 @@
             // 
             this.clbCollector.CheckOnClick = true;
             this.clbCollector.FormattingEnabled = true;
-            this.clbCollector.Location = new System.Drawing.Point(408, 23);
+            this.clbCollector.Location = new System.Drawing.Point(350, 23);
             this.clbCollector.Name = "clbCollector";
             this.clbCollector.Size = new System.Drawing.Size(138, 94);
             this.clbCollector.TabIndex = 7;
             // 
             // btnSaveContactor
             // 
-            this.btnSaveContactor.Location = new System.Drawing.Point(652, 21);
+            this.btnSaveContactor.Location = new System.Drawing.Point(649, 89);
             this.btnSaveContactor.Name = "btnSaveContactor";
             this.btnSaveContactor.Size = new System.Drawing.Size(121, 28);
             this.btnSaveContactor.TabIndex = 4;
@@ -764,7 +767,7 @@
             // label20
             // 
             this.label20.AutoSize = true;
-            this.label20.Location = new System.Drawing.Point(326, 27);
+            this.label20.Location = new System.Drawing.Point(278, 27);
             this.label20.Name = "label20";
             this.label20.Size = new System.Drawing.Size(44, 17);
             this.label20.TabIndex = 2;
@@ -837,6 +840,26 @@
             this.btnAddtTask.UseVisualStyleBackColor = false;
             this.btnAddtTask.Click += new System.EventHandler(this.btnAddtTask_Click);
             // 
+            // chkIsAuthorized
+            // 
+            this.chkIsAuthorized.AutoSize = true;
+            this.chkIsAuthorized.Location = new System.Drawing.Point(559, 25);
+            this.chkIsAuthorized.Name = "chkIsAuthorized";
+            this.chkIsAuthorized.Size = new System.Drawing.Size(75, 21);
+            this.chkIsAuthorized.TabIndex = 8;
+            this.chkIsAuthorized.Text = "授权合作";
+            this.chkIsAuthorized.UseVisualStyleBackColor = true;
+            // 
+            // btnAuthorizeFunds
+            // 
+            this.btnAuthorizeFunds.Location = new System.Drawing.Point(649, 21);
+            this.btnAuthorizeFunds.Name = "btnAuthorizeFunds";
+            this.btnAuthorizeFunds.Size = new System.Drawing.Size(121, 28);
+            this.btnAuthorizeFunds.TabIndex = 9;
+            this.btnAuthorizeFunds.Text = "批量基金授权";
+            this.btnAuthorizeFunds.UseVisualStyleBackColor = true;
+            this.btnAuthorizeFunds.Click += new System.EventHandler(this.btnAuthorizeFunds_Click);
+            // 
             // UICompany
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -947,5 +970,7 @@
         private System.Windows.Forms.Button btnAddtTask;
         private System.Windows.Forms.DataGridView grdTaskList;
         private System.Windows.Forms.ComboBox cmbTaskType;
+        private System.Windows.Forms.CheckBox chkIsAuthorized;
+        private System.Windows.Forms.Button btnAuthorizeFunds;
     }
 }

+ 33 - 2
UICompany.cs

@@ -155,6 +155,9 @@ namespace DataManager
                 old_selected_collector.Add(item);
             }
 
+            DataTable dt = DataAccess.Get_dm_company_authorization(CompanyId, null);
+            if (dt != null && dt.Rows.Count > 0) chkIsAuthorized.Checked = true;
+
             LoadContractFiles();
 
             #endregion
@@ -175,7 +178,27 @@ namespace DataManager
 
         private void btnSaveBasicInfo_Click(object sender, EventArgs e)
         {
-            MessageBox.Show("暂时不支持存数据");
+            if (companyInfo == null || companyInfo.Rows.Count == 0) return;
+
+
+            string originalShortName = companyInfo.Rows[0]["company_short_name"].ToString();
+
+            string currentShortName = txtCompanyShortName.Text.Trim();
+
+            if (originalShortName == currentShortName) return;
+
+
+            if (currentShortName.Length > 0)
+            {
+                int ret = DataAccess.Set_dm_company_information(CompanyId, currentShortName, UserId);
+
+                MessageBox.Show(ret < 0 ? "Oops... 变更存数据库时出了错" : "数据变更已经成功存盘~", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+            else
+            {
+                MessageBox.Show("公司简称不能空着,把意义不大又重复的词去掉试试?", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtCompanyShortName.Focus();
+            }
         }
 
         #endregion
@@ -358,8 +381,9 @@ namespace DataManager
             string query = JsonSerializer.Serialize(coverage);
             
             int ret = DataAccess.Set_dm_company_cover(query, UserId);
+            int ret2 = DataAccess.Set_dm_company_authorization(CompanyId, chkIsAuthorized.Checked ? 1 : 0, UserId);
 
-            string message = ret < 0 ? "Oops... 变更存数据库时出了错" : "人员覆盖变更已经成功存盘~";
+            string message = (ret * ret2) < 0 ? "Oops... 变更存数据库时出了错" : "数据变更已经成功存盘~";
             MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
 
         }
@@ -415,6 +439,12 @@ namespace DataManager
             return companyCoverUser;
         }
 
+        private void btnAuthorizeFunds_Click(object sender, EventArgs e)
+        {
+            UIBuckAuthorizeFund frm = new UIBuckAuthorizeFund(UserId);
+            frm.Show();
+        }
+
         /// <summary>
         /// 上传文件  TODO: 文件先写到本地
         /// </summary>
@@ -716,6 +746,7 @@ namespace DataManager
                 }
             }
         }
+
     }
 
     public class CompanyCoverUser

+ 3 - 0
UICompany.resx

@@ -120,6 +120,9 @@
   <metadata name="sstCompany.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="sstCompany.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <metadata name="ofdUploadFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>143, 17</value>
   </metadata>