|
@@ -14,6 +14,7 @@ using System.ComponentModel.Design;
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView;
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView;
|
|
using System.Xml.Linq;
|
|
using System.Xml.Linq;
|
|
using System.Windows;
|
|
using System.Windows;
|
|
|
|
+using System.Security.Policy;
|
|
|
|
|
|
namespace DataManager
|
|
namespace DataManager
|
|
{
|
|
{
|
|
@@ -349,6 +350,37 @@ namespace DataManager
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ public static int Set_dm_company_information(string companyId, string shortName, int userId)
|
|
|
|
+ {
|
|
|
|
+ int ret = -1;
|
|
|
|
+
|
|
|
|
+ using (MySqlConnection connection = new MySqlConnection(connectionString))
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ connection.Open();
|
|
|
|
+
|
|
|
|
+ MySqlCommand cmd = new MySqlCommand("sp_set_dm_company_information", connection);
|
|
|
|
+
|
|
|
|
+ MySqlParameter i_company_id = new MySqlParameter("i_company_id", companyId);
|
|
|
|
+ MySqlParameter i_company_short_name = new MySqlParameter("i_company_short_name", shortName);
|
|
|
|
+ MySqlParameter i_userid = new MySqlParameter("i_userid", userId);
|
|
|
|
+
|
|
|
|
+ cmd.Parameters.Add(i_company_id);
|
|
|
|
+ cmd.Parameters.Add(i_company_short_name);
|
|
|
|
+ cmd.Parameters.Add(i_userid);
|
|
|
|
+
|
|
|
|
+ cmd.CommandType = CommandType.StoredProcedure;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ cmd.Connection = connection;
|
|
|
|
+ cmd.ExecuteNonQuery();
|
|
|
|
+
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 搜索公司(目前仅支持对 company_short_name 的搜索)
|
|
/// 搜索公司(目前仅支持对 company_short_name 的搜索)
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -774,13 +806,15 @@ namespace DataManager
|
|
return dt;
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
|
|
- public static DataTable Get_dm_company_authorization(int? userId)
|
|
|
|
|
|
+ public static DataTable Get_dm_company_authorization(string companyId, int? userId)
|
|
{
|
|
{
|
|
MySqlConnection connection = new MySqlConnection(connectionString);
|
|
MySqlConnection connection = new MySqlConnection(connectionString);
|
|
MySqlDataAdapter ad = new MySqlDataAdapter("sp_get_dm_company_authorization", connection);
|
|
MySqlDataAdapter ad = new MySqlDataAdapter("sp_get_dm_company_authorization", connection);
|
|
|
|
|
|
|
|
+ MySqlParameter i_company_id = new MySqlParameter("i_company_id", companyId);
|
|
MySqlParameter i_userid = new MySqlParameter("i_userid", userId);
|
|
MySqlParameter i_userid = new MySqlParameter("i_userid", userId);
|
|
|
|
|
|
|
|
+ ad.SelectCommand.Parameters.Add(i_company_id);
|
|
ad.SelectCommand.Parameters.Add(i_userid);
|
|
ad.SelectCommand.Parameters.Add(i_userid);
|
|
|
|
|
|
ad.SelectCommand.CommandType = CommandType.StoredProcedure;
|
|
ad.SelectCommand.CommandType = CommandType.StoredProcedure;
|
|
@@ -830,5 +864,65 @@ namespace DataManager
|
|
|
|
|
|
return dt;
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public static int Set_dm_fund_authorization(string ids, int isValid, int userId)
|
|
|
|
+ {
|
|
|
|
+ int ret = -1;
|
|
|
|
+
|
|
|
|
+ using (MySqlConnection connection = new MySqlConnection(connectionString))
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ connection.Open();
|
|
|
|
+
|
|
|
|
+ MySqlCommand cmd = new MySqlCommand("sp_set_dm_fund_authorization", connection);
|
|
|
|
+
|
|
|
|
+ MySqlParameter i_fund_ids = new MySqlParameter("i_fund_ids", ids);
|
|
|
|
+ MySqlParameter i_isvalid = new MySqlParameter("i_isvalid", isValid);
|
|
|
|
+ MySqlParameter i_userid = new MySqlParameter("i_userid", userId);
|
|
|
|
+
|
|
|
|
+ cmd.Parameters.Add(i_fund_ids);
|
|
|
|
+ cmd.Parameters.Add(i_isvalid);
|
|
|
|
+ cmd.Parameters.Add(i_userid);
|
|
|
|
+
|
|
|
|
+ cmd.CommandType = CommandType.StoredProcedure;
|
|
|
|
+
|
|
|
|
+ cmd.Connection = connection;
|
|
|
|
+ cmd.ExecuteNonQuery();
|
|
|
|
+
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static int Set_dm_company_authorization(string companyId, int isAuthorized, int userId)
|
|
|
|
+ {
|
|
|
|
+ int ret = -1;
|
|
|
|
+
|
|
|
|
+ using (MySqlConnection connection = new MySqlConnection(connectionString))
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ connection.Open();
|
|
|
|
+
|
|
|
|
+ MySqlCommand cmd = new MySqlCommand("sp_set_dm_company_authorization", connection);
|
|
|
|
+
|
|
|
|
+ MySqlParameter i_company_id = new MySqlParameter("i_company_id", companyId);
|
|
|
|
+ MySqlParameter i_isvalid = new MySqlParameter("i_isvalid", isAuthorized);
|
|
|
|
+ MySqlParameter i_userid = new MySqlParameter("i_userid", userId);
|
|
|
|
+
|
|
|
|
+ cmd.Parameters.Add(i_company_id);
|
|
|
|
+ cmd.Parameters.Add(i_isvalid);
|
|
|
|
+ cmd.Parameters.Add(i_userid);
|
|
|
|
+
|
|
|
|
+ cmd.CommandType = CommandType.StoredProcedure;
|
|
|
|
+
|
|
|
|
+ cmd.Connection = connection;
|
|
|
|
+ cmd.ExecuteNonQuery();
|
|
|
|
+
|
|
|
|
+ ret = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|