20210618
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
|
||||
@@ -22,18 +19,13 @@ namespace FineUIPro.Web.ZHGL.RealName
|
||||
///权限
|
||||
this.GetButtonPower();
|
||||
ProjectService.InitAllProjectShortNameDropDownList(this.drpProject, this.CurrUser.UserId, false);
|
||||
var getSynchroSet = SynchroSetService.GetSynchroSetByUnitId(Const.UnitId_CWCEC, this.drpProject.SelectedValue);
|
||||
if (getSynchroSet != null)
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.txtapiUrl.Text = getSynchroSet.ApiUrl;
|
||||
this.txtclientId.Text = getSynchroSet.ClientId;
|
||||
this.txtUserName.Text = getSynchroSet.UserName;
|
||||
this.txtword.Text = getSynchroSet.Password;
|
||||
this.txtintervaltime.Text = getSynchroSet.Intervaltime.ToString();
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.drpProject.Readonly = true;
|
||||
}
|
||||
|
||||
this.txtapiUrl.Text = Funs.RealNameApiUrl;
|
||||
this.txtintervaltime.Text = ConfigurationManager.AppSettings["Intervaltime"];
|
||||
this.SetPage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +94,8 @@ namespace FineUIPro.Web.ZHGL.RealName
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.RealNameSynchroSetMenuId);
|
||||
string menuId = !string.IsNullOrEmpty(this.CurrUser.LoginProjectId) ? Const.RealNameSynchroSetMenuId : Const.ServerRealNameSynchroSetMenuId;
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
@@ -225,12 +218,22 @@ namespace FineUIPro.Web.ZHGL.RealName
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.SetPage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected void SetPage()
|
||||
{
|
||||
this.txtclientId.Text = string.Empty;
|
||||
this.txtUserName.Text = string.Empty;
|
||||
this.txtword.Text = string.Empty;
|
||||
this.txtapiUrl.Text = Funs.RealNameApiUrl;
|
||||
this.txtintervaltime.Text = ConfigurationManager.AppSettings["Intervaltime"];
|
||||
|
||||
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
|
||||
string proCode = BLL.ProjectService.GetProjectCodeByProjectId(this.drpProject.SelectedValue);
|
||||
if (!string.IsNullOrEmpty(proCode))
|
||||
{
|
||||
var getSynchroSet = SynchroSetService.GetSynchroSetByUnitId(Const.UnitId_CWCEC, proCode);
|
||||
|
||||
Reference in New Issue
Block a user