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
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,10 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using BLL.Common;
|
||||
using FastReport.Cloud.OAuth;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
@@ -39,11 +42,11 @@ namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.DeviceId = Request.Params["DeviceId"];
|
||||
if (!string.IsNullOrEmpty(this.DeviceId))
|
||||
{
|
||||
Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId==this.DeviceId);
|
||||
Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == this.DeviceId);
|
||||
if (device != null)
|
||||
{
|
||||
this.txtDeviceName.Text = device.DeviceName;
|
||||
@@ -59,8 +62,8 @@ namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
this.dpCreateDate.Text = string.Format("{0:yyyy-MM-dd}", device.CreateDate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,15 +77,15 @@ namespace FineUIPro.Web.ProjectData
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
Model.Project_Devices device = new Model.Project_Devices
|
||||
{
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
DeviceName = this.txtDeviceName.Text.Trim(),
|
||||
DeviceSerial = this.txtDeviceSerial.Text.Trim(),
|
||||
Address = txtAddress.Text.Trim(),
|
||||
ValidateCode=txtValidateCode.Text.Trim(),
|
||||
ValidateCode = txtValidateCode.Text.Trim(),
|
||||
CreateDate = Funs.GetNewDateTime(this.dpCreateDate.Text.Trim())
|
||||
};
|
||||
if (this.drpInOut.SelectedValue != BLL.Const._Null)
|
||||
@@ -121,9 +124,9 @@ namespace FineUIPro.Web.ProjectData
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,12 +30,7 @@
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" >
|
||||
|
||||
@@ -51,6 +51,35 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
#region 云眸
|
||||
///通用
|
||||
var getProject = ProjectService.GetProjectByProjectId(projectId);
|
||||
if (getProject != null)
|
||||
{
|
||||
getProject.IsYunMou = this.ckbIsYunMou.Checked;
|
||||
if (this.ckbIsYunMou.Checked)
|
||||
{
|
||||
var token = YunMouHelper.getToken();
|
||||
string data;
|
||||
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
|
||||
YunMouHelper.addDevicesGroups(getProject.ProjectName, data, token);
|
||||
var groupId = YunMouHelper.addPermissionGroups(getProject.ProjectName, token);
|
||||
if (!string.IsNullOrEmpty(groupId))
|
||||
{
|
||||
getProject.YunMouGroupId = groupId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var token = YunMouHelper.getToken();
|
||||
string data;
|
||||
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
|
||||
YunMouHelper.deleteDevicesGroups(data, token);//删除设备分组,如果有子节点,可以不删除
|
||||
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
#endregion
|
||||
#region 焊接
|
||||
// 焊接
|
||||
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
|
||||
@@ -339,7 +368,11 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
|
||||
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
|
||||
}
|
||||
|
||||
var getProject = ProjectService.GetProjectByProjectId(projectId);
|
||||
if (getProject != null && getProject.IsYunMou == true)
|
||||
{
|
||||
this.ckbIsYunMou.Checked = true;
|
||||
}
|
||||
//颜色模型设置
|
||||
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
||||
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;
|
||||
|
||||
Reference in New Issue
Block a user