Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SeDin_New
This commit is contained in:
@@ -27,9 +27,8 @@ namespace FineUIPro.Web.ProjectData
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
////权限按钮方法
|
||||
@@ -60,7 +59,7 @@ namespace FineUIPro.Web.ProjectData
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#region 操作 Events
|
||||
@@ -165,7 +164,7 @@ namespace FineUIPro.Web.ProjectData
|
||||
return;
|
||||
}
|
||||
|
||||
var device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId== Grid1.SelectedRowID) ;
|
||||
var device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == Grid1.SelectedRowID);
|
||||
if (device != null)
|
||||
{
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
@@ -202,13 +201,14 @@ namespace FineUIPro.Web.ProjectData
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
var token = YunMouHelper.getToken();
|
||||
var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
|
||||
YunMouHelper.setDefence(device.DeviceSerial,"1",token);
|
||||
YunMouHelper.setDefence(device.DeviceSerial, "1", token);
|
||||
if (string.IsNullOrEmpty(res))
|
||||
{
|
||||
Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
device.YunMouPermission = "是";
|
||||
Funs.DB.SubmitChanges();
|
||||
ShowNotify("关联成功", MessageBoxIcon.Success);
|
||||
@@ -216,7 +216,7 @@ namespace FineUIPro.Web.ProjectData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void btnMenuDeletePermission_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
@@ -256,8 +256,8 @@ namespace FineUIPro.Web.ProjectData
|
||||
return;
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -283,18 +283,18 @@ namespace FineUIPro.Web.ProjectData
|
||||
return;
|
||||
}
|
||||
string menuId = BLL.Const.ProjectDevicesMenuId;
|
||||
|
||||
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnAdd.Hidden = false;
|
||||
|
||||
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuDeletePermission.Hidden= false;
|
||||
this.btnMenuDeletePermission.Hidden = false;
|
||||
this.btnAdd.Hidden = false;
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
this.btnMenuDeviceToYunMou.Hidden = false;
|
||||
@@ -305,7 +305,7 @@ namespace FineUIPro.Web.ProjectData
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
@@ -321,8 +321,8 @@ namespace FineUIPro.Web.ProjectData
|
||||
this.BindGrid();
|
||||
this.GetButtonPower();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user