提交首页修改
This commit is contained in:
@@ -108,6 +108,14 @@
|
||||
<f:Label ID="Label13" runat="server" Text="日" MarginLeft="5px"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="70% 30%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSerVerUrl" runat="server" Label="集团接口地址" LabelWidth="230px"></f:TextBox>
|
||||
<f:Button ID="btnApply" Icon="SystemSave" Text="申请对接" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnApply_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using BLL;
|
||||
using Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
using Model;
|
||||
|
||||
namespace FineUIPro.Web.SysManage
|
||||
{
|
||||
@@ -360,6 +363,11 @@ namespace FineUIPro.Web.SysManage
|
||||
this.txtDecemberday.Text = (str[1] == null ? "" : str[1]).ToString();
|
||||
}
|
||||
}
|
||||
var sysSet9 = (from x in Funs.DB.Sys_Set where x.SetName == "集团接口地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet9 != null)
|
||||
{
|
||||
txtSerVerUrl.Text = sysSet9.SetValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -540,6 +548,26 @@ namespace FineUIPro.Web.SysManage
|
||||
Funs.DB.Sys_Const.InsertOnSubmit(newSysSet8);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
Model.Sys_Set sysSet9 = db.Sys_Set.FirstOrDefault(x => x.SetName == "集团接口地址");
|
||||
if (sysSet9 != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtSerVerUrl.Text.Trim()))
|
||||
{
|
||||
sysSet9.SetValue = this.txtSerVerUrl.Text.Trim();
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Set newSysSet9 = new Model.Sys_Set();
|
||||
if (!string.IsNullOrEmpty(this.txtSerVerUrl.Text.Trim()))
|
||||
{
|
||||
newSysSet9.SetValue = this.txtSerVerUrl.Text.Trim();
|
||||
}
|
||||
newSysSet9.SetName = "集团接口地址";
|
||||
Funs.DB.Sys_Set.InsertOnSubmit(newSysSet9);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, "修改系统环境设置!", string.Empty, BLL.Const.SysConstSetMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
@@ -1124,5 +1152,32 @@ namespace FineUIPro.Web.SysManage
|
||||
this.BindGridOutPut();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btnApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
string CNCECPath = SysConstSetService.CNCECPath;
|
||||
|
||||
string baseurl = CNCECPath + "/api/Common/ApplyToken";
|
||||
var client = new RestClient(baseurl);
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.POST);
|
||||
var thisUnit = BLL.UnitService.GetUnitByUnitId(BLL.Const.UnitId_CD);
|
||||
request.AddParameter("UnitName", thisUnit.UnitName);
|
||||
request.AddParameter("CollCropCode", thisUnit.CollCropCode);
|
||||
IRestResponse response = client.Execute(request);
|
||||
var responeData = JsonConvert.DeserializeObject<Model.ResponeData>(response.Content.ToString());
|
||||
TokenItem tokenItem = new TokenItem();
|
||||
if (responeData.code == 1)
|
||||
{
|
||||
var token = JsonConvert.DeserializeObject<Model.TokenItem>(responeData.data.ToString());
|
||||
tokenItem.Token = token.Token.ToString();
|
||||
tokenItem.ExpiryTime = token.ExpiryTime.ToString();
|
||||
SysConstSetService.SetToken(tokenItem.Token);
|
||||
SysConstSetService.SetTokenExpirationTime(tokenItem.ExpiryTime);
|
||||
}
|
||||
Alert.Show(response.Content);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,6 +291,24 @@ namespace FineUIPro.Web.SysManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label13;
|
||||
|
||||
/// <summary>
|
||||
/// txtSerVerUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSerVerUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnApply 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnApply;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -68,7 +68,10 @@
|
||||
<f:DropDownList ID="drpViceCNProfessional" runat="server" Label="副专业" EnableEdit="true"
|
||||
EnableMultiSelect="true" MaxLength="500" EnableCheckBoxSelect="true">
|
||||
</f:DropDownList>
|
||||
<f:Label runat="server"></f:Label>
|
||||
<f:RadioButtonList runat="server" ID="rblHomePageType" Label="首页加载">
|
||||
<f:RadioItem Text="施工管理" Value="1" Selected="true" />
|
||||
<f:RadioItem Text="QHSE" Value="2" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
||||
@@ -133,6 +133,10 @@ namespace FineUIPro.Web.SysManage
|
||||
{
|
||||
this.drpViceCNProfessional.SelectedValueArray = user.ViceCNProfessionalId.Split(',');
|
||||
}
|
||||
if (!string.IsNullOrEmpty(user.HomePageType))
|
||||
{
|
||||
this.rblHomePageType.SelectedValue = user.HomePageType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,6 +237,7 @@ namespace FineUIPro.Web.SysManage
|
||||
}
|
||||
}
|
||||
}
|
||||
newUser.HomePageType = this.rblHomePageType.SelectedValue;
|
||||
if (string.IsNullOrEmpty(this.UserId))
|
||||
{
|
||||
newUser.Password = Funs.EncryptionPassword(Const.Password);
|
||||
|
||||
@@ -174,6 +174,15 @@ namespace FineUIPro.Web.SysManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpViceCNProfessional;
|
||||
|
||||
/// <summary>
|
||||
/// rblHomePageType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblHomePageType;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user