增加颜色标识库
This commit is contained in:
Binary file not shown.
@@ -67,10 +67,6 @@
|
|||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}"
|
"Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"$type": "Bookmark",
|
|
||||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||||
|
|||||||
@@ -70,6 +70,10 @@
|
|||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Bookmark",
|
||||||
|
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using FineUIPro;
|
using FineUIPro;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -23,9 +24,24 @@ namespace BLL
|
|||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
private static IQueryable<Model.Base_MaterialColor> GetByQueryModle(Model.Base_MaterialColor table)
|
private static IQueryable<Model.BaseMaterialcolorOutput> GetByQueryModle(Model.BaseMaterialcolorOutput table)
|
||||||
{
|
{
|
||||||
var q = from x in Funs.DB.Base_MaterialColor select x;
|
var q = from x in Funs.DB.Base_MaterialColor
|
||||||
|
join y in Funs.DB.Base_Material on x.MaterialId equals y.MaterialId into yy
|
||||||
|
from y in yy.DefaultIfEmpty()
|
||||||
|
select new BaseMaterialcolorOutput
|
||||||
|
{
|
||||||
|
MaterialId = y.MaterialId,
|
||||||
|
MaterialCode = y.MaterialCode,
|
||||||
|
MaterialColorId = x.MaterialColorId,
|
||||||
|
UnitId = x.UnitId,
|
||||||
|
ProjectId = x.ProjectId,
|
||||||
|
ColorName = x.ColorName,
|
||||||
|
ColorCardNo = x.ColorCardNo,
|
||||||
|
RGB = x.RGB,
|
||||||
|
Remark= x.Remark,
|
||||||
|
|
||||||
|
};
|
||||||
if (table == null)
|
if (table == null)
|
||||||
{
|
{
|
||||||
return q;
|
return q;
|
||||||
@@ -38,10 +54,18 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
q = q.Where(x => x.UnitId.Contains(table.UnitId));
|
q = q.Where(x => x.UnitId.Contains(table.UnitId));
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(table.ProjectId))
|
||||||
|
{
|
||||||
|
q = q.Where(x => x.ProjectId.Contains(table.ProjectId));
|
||||||
|
}
|
||||||
if (!string.IsNullOrEmpty(table.MaterialId))
|
if (!string.IsNullOrEmpty(table.MaterialId))
|
||||||
{
|
{
|
||||||
q = q.Where(x => x.MaterialId.Contains(table.MaterialId));
|
q = q.Where(x => x.MaterialId.Contains(table.MaterialId));
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(table.MaterialCode))
|
||||||
|
{
|
||||||
|
q = q.Where(x => x.MaterialCode.Contains(table.MaterialCode));
|
||||||
|
}
|
||||||
if (!string.IsNullOrEmpty(table.ColorName))
|
if (!string.IsNullOrEmpty(table.ColorName))
|
||||||
{
|
{
|
||||||
q = q.Where(x => x.ColorName.Contains(table.ColorName));
|
q = q.Where(x => x.ColorName.Contains(table.ColorName));
|
||||||
@@ -62,12 +86,12 @@ namespace BLL
|
|||||||
|
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
public static List<Model.Base_MaterialColor> GetListByQueryModle(Model.Base_MaterialColor table)
|
public static List<Model.BaseMaterialcolorOutput> GetListByQueryModle(Model.BaseMaterialcolorOutput table)
|
||||||
{
|
{
|
||||||
return GetByQueryModle(table).ToList();
|
return GetByQueryModle(table).ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
public static (List<Model.Base_MaterialColor> Data, int Total) GetListByQueryModle(Model.Base_MaterialColor table, int pageIndex = 0, int pageSize = 20)
|
public static (List<Model.BaseMaterialcolorOutput> Data, int Total) GetListByQueryModle(Model.BaseMaterialcolorOutput table, int pageIndex = 0, int pageSize = 20)
|
||||||
{
|
{
|
||||||
var baseQuery = GetByQueryModle(table);
|
var baseQuery = GetByQueryModle(table);
|
||||||
var pagedData = baseQuery
|
var pagedData = baseQuery
|
||||||
@@ -87,7 +111,7 @@ namespace BLL
|
|||||||
/// <param name="table"></param>
|
/// <param name="table"></param>
|
||||||
/// <param name="grid1"></param>
|
/// <param name="grid1"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IEnumerable GetListData(Model.Base_MaterialColor table, Grid grid1)
|
public static IEnumerable GetListData(Model.BaseMaterialcolorOutput table, Grid grid1)
|
||||||
{
|
{
|
||||||
var q = GetByQueryModle(table);
|
var q = GetByQueryModle(table);
|
||||||
Count = q.Count();
|
Count = q.Count();
|
||||||
@@ -102,6 +126,7 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
x.MaterialColorId,
|
x.MaterialColorId,
|
||||||
x.UnitId,
|
x.UnitId,
|
||||||
|
x.ProjectId,
|
||||||
x.MaterialId,
|
x.MaterialId,
|
||||||
x.ColorName,
|
x.ColorName,
|
||||||
x.ColorCardNo,
|
x.ColorCardNo,
|
||||||
@@ -125,6 +150,7 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
MaterialColorId = newtable.MaterialColorId,
|
MaterialColorId = newtable.MaterialColorId,
|
||||||
UnitId = newtable.UnitId,
|
UnitId = newtable.UnitId,
|
||||||
|
ProjectId= newtable.ProjectId,
|
||||||
MaterialId = newtable.MaterialId,
|
MaterialId = newtable.MaterialId,
|
||||||
ColorName = newtable.ColorName,
|
ColorName = newtable.ColorName,
|
||||||
ColorCardNo = newtable.ColorCardNo,
|
ColorCardNo = newtable.ColorCardNo,
|
||||||
@@ -144,6 +170,7 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
table.MaterialColorId = newtable.MaterialColorId;
|
table.MaterialColorId = newtable.MaterialColorId;
|
||||||
table.UnitId = newtable.UnitId;
|
table.UnitId = newtable.UnitId;
|
||||||
|
table.ProjectId = newtable.ProjectId;
|
||||||
table.MaterialId = newtable.MaterialId;
|
table.MaterialId = newtable.MaterialId;
|
||||||
table.ColorName = newtable.ColorName;
|
table.ColorName = newtable.ColorName;
|
||||||
table.ColorCardNo = newtable.ColorCardNo;
|
table.ColorCardNo = newtable.ColorCardNo;
|
||||||
|
|||||||
@@ -55,12 +55,8 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode"
|
||||||
<f:RenderField Width="150px" ColumnID="UnitId" DataField="UnitId" SortField="UnitId"
|
|
||||||
FieldType="String" HeaderText="单位id" TextAlign="Left" HeaderTextAlign="Center" >
|
|
||||||
</f:RenderField>
|
|
||||||
<f:RenderField Width="150px" ColumnID="MaterialId" DataField="MaterialId" SortField="MaterialId"
|
|
||||||
FieldType="String" HeaderText="材质id" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="材质id" TextAlign="Left" HeaderTextAlign="Center" >
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="ColorName" DataField="ColorName" SortField="ColorName"
|
<f:RenderField Width="150px" ColumnID="ColorName" DataField="ColorName" SortField="ColorName"
|
||||||
@@ -99,7 +95,7 @@
|
|||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
|
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
|
||||||
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||||
Title="编辑Base_MaterialColor" EnableIFrame="true" Height="650px"
|
Title="编辑" EnableIFrame="true" Height="650px"
|
||||||
Width="1200px">
|
Width="1200px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
Model.Base_MaterialColor table = new Model.Base_MaterialColor();
|
Model.BaseMaterialcolorOutput table = new Model.BaseMaterialcolorOutput();
|
||||||
|
table.ProjectId=this.CurrUser.LoginProjectId;
|
||||||
var tb = BLL.BaseMaterialcolorService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize);
|
var tb = BLL.BaseMaterialcolorService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize);
|
||||||
Grid1.RecordCount = tb.Total;
|
Grid1.RecordCount = tb.Total;
|
||||||
Grid1.DataSource = tb.Data;
|
Grid1.DataSource = tb.Data;
|
||||||
@@ -91,7 +92,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnNew_Click(object sender, EventArgs e)
|
protected void btnNew_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("Base_MaterialColorEdit.aspx?MaterialColorId={0}", string.Empty, "增加 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialColorEdit.aspx?MaterialColorId={0}", string.Empty, "增加 - ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -110,7 +111,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
var model = BLL.BaseMaterialcolorService.GetModelById(ID);
|
var model = BLL.BaseMaterialcolorService.GetModelById(ID);
|
||||||
if (model != null) ///已上报时不能删除
|
if (model != null) ///已上报时不能删除
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("Base_MaterialColorEdit.aspx?MaterialColorId={0}", ID, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialColorEdit.aspx?MaterialColorId={0}", ID, "编辑 - ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title></title>
|
<title></title>
|
||||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
@@ -15,57 +15,81 @@
|
|||||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
<Rows>
|
<Rows>
|
||||||
<f:FormRow>
|
|
||||||
<Items>
|
<f:FormRow>
|
||||||
<f:TextBox ID="txtUnitId" runat="server" Label="单位id" MaxLength="200" >
|
<Items>
|
||||||
</f:TextBox>
|
<f:DropDownBox runat="server" ID="drpMaterialId" EmptyText="请从下拉表格中选择" MatchFieldWidth="false" Values="105" EnableMultiSelect="false" Label="材质">
|
||||||
</Items>
|
<PopPanel>
|
||||||
</f:FormRow>
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" DataIDField="MaterialId" DataTextField="MaterialCode"
|
||||||
<f:FormRow>
|
DataKeyNames="MaterialId" Hidden="true" Width="550px" Height="600px" EnableMultiSelect="false">
|
||||||
<Items>
|
<Columns>
|
||||||
<f:TextBox ID="txtMaterialId" runat="server" Label="材质id" MaxLength="200" >
|
<f:BoundField DataField="MaterialCode" DataFormatString="{0}" HeaderText="型号、牌号、级别" Width="180px" />
|
||||||
</f:TextBox>
|
<f:TemplateField HeaderText="材质类型">
|
||||||
</Items>
|
<ItemTemplate>
|
||||||
</f:FormRow>
|
<asp:Label ID="Label3" runat="server" Text='<%# ConvertSteelType(Eval("SteelType")) %>'></asp:Label>
|
||||||
<f:FormRow>
|
</ItemTemplate>
|
||||||
<Items>
|
</f:TemplateField>
|
||||||
<f:TextBox ID="txtColorName" runat="server" Label="颜色名称" MaxLength="200" >
|
<f:BoundField ExpandUnusedSpace="true" MinWidth="200px" DataField="MaterialType" HeaderText="材料标准" />
|
||||||
</f:TextBox>
|
</Columns>
|
||||||
</Items>
|
<Toolbars>
|
||||||
</f:FormRow>
|
<f:Toolbar runat="server" Position="Top">
|
||||||
<f:FormRow>
|
<Items>
|
||||||
<Items>
|
<f:TextBox ID="txtMaterialCode" runat="server" Label="型号、牌号、级别"
|
||||||
<f:TextBox ID="txtColorCardNo" runat="server" Label="色卡号" MaxLength="200" >
|
EmptyText="输入查询条件" Width="320px" LabelWidth="200px" LabelAlign="Right">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
</Items>
|
<f:DropDownList ID="drpSteType" runat="server" Label="材质类型"
|
||||||
</f:FormRow>
|
EnableEdit="true" Width="300px" LabelWidth="140px" LabelAlign="Right">
|
||||||
<f:FormRow>
|
</f:DropDownList>
|
||||||
<Items>
|
<f:Button ID="btnQuery" Text="查询" Icon="SystemSearch"
|
||||||
<f:TextBox ID="txtRGB" runat="server" Label="" MaxLength="200" >
|
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||||
</f:TextBox>
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:Toolbar>
|
||||||
<f:FormRow>
|
</Toolbars>
|
||||||
<Items>
|
</f:Grid>
|
||||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200" >
|
</PopPanel>
|
||||||
</f:TextBox>
|
</f:DropDownBox>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtColorName" runat="server" Label="颜色名称" MaxLength="200">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtColorCardNo" runat="server" Label="色卡号" MaxLength="200">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtRGB" runat="server" Label="RGB代码" MaxLength="200">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
|
||||||
</Rows>
|
</Rows>
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||||
OnClick="btnSave_Click">
|
OnClick="btnSave_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose">
|
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
</f:Form>
|
</f:Form>
|
||||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||||
Height="500px">
|
Height="500px">
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
@@ -8,9 +10,12 @@ using System.Web.UI.WebControls;
|
|||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||||
{
|
{
|
||||||
public partial class MaterialColorEdit: PageBase
|
public partial class MaterialColorEdit : PageBase
|
||||||
{
|
{
|
||||||
#region
|
#region
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主键
|
/// 主键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -25,8 +30,18 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
ViewState["MaterialColorId"] = value;
|
ViewState["MaterialColorId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion Properties
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
@@ -34,23 +49,32 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
|
this.drpSteType.DataTextField = "Text";
|
||||||
|
this.drpSteType.DataValueField = "Value";
|
||||||
|
this.drpSteType.DataSource = BLL.DropListService.HJGL_GetSteTypeList();
|
||||||
|
this.drpSteType.DataBind();
|
||||||
|
Funs.FineUIPleaseSelect(this.drpSteType);
|
||||||
|
BindGrid();
|
||||||
this.MaterialColorId = Request.Params["MaterialColorId"];
|
this.MaterialColorId = Request.Params["MaterialColorId"];
|
||||||
if (!string.IsNullOrEmpty(this.MaterialColorId))
|
if (!string.IsNullOrEmpty(this.MaterialColorId))
|
||||||
{
|
{
|
||||||
Model.Base_MaterialColor model = BLL.BaseMaterialcolorService.GetModelById(this.MaterialColorId);
|
Model.Base_MaterialColor model = BLL.BaseMaterialcolorService.GetModelById(this.MaterialColorId);
|
||||||
if (model != null)
|
if (model != null)
|
||||||
{
|
{
|
||||||
this.txtUnitId.Text = model.UnitId;
|
this.drpMaterialId.Value = model.MaterialId;
|
||||||
this.txtMaterialId.Text = model.MaterialId;
|
this.drpMaterialId.Text = null;
|
||||||
this.txtColorName.Text = model.ColorName;
|
this.txtColorName.Text = model.ColorName;
|
||||||
this.txtColorCardNo.Text = model.ColorCardNo;
|
this.txtColorCardNo.Text = model.ColorCardNo;
|
||||||
this.txtRGB.Text = model.RGB;
|
this.txtRGB.Text = model.RGB;
|
||||||
this.txtRemark.Text = model.Remark;
|
this.txtRemark.Text = model.Remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
protected void btnQuery_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存按钮
|
/// 保存按钮
|
||||||
@@ -60,8 +84,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Model.Base_MaterialColor table = new Model.Base_MaterialColor();
|
Model.Base_MaterialColor table = new Model.Base_MaterialColor();
|
||||||
table.UnitId = this.txtUnitId.Text;
|
table.MaterialId = this.drpMaterialId.Value;
|
||||||
table.MaterialId = this.txtMaterialId.Text;
|
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
table.ColorName = this.txtColorName.Text;
|
table.ColorName = this.txtColorName.Text;
|
||||||
table.ColorCardNo = this.txtColorCardNo.Text;
|
table.ColorCardNo = this.txtColorCardNo.Text;
|
||||||
table.RGB = this.txtRGB.Text;
|
table.RGB = this.txtRGB.Text;
|
||||||
@@ -70,7 +94,6 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
{
|
{
|
||||||
table.MaterialColorId = SQLHelper.GetNewID(typeof(Model.Base_MaterialColor));
|
table.MaterialColorId = SQLHelper.GetNewID(typeof(Model.Base_MaterialColor));
|
||||||
BLL.BaseMaterialcolorService.Add(table);
|
BLL.BaseMaterialcolorService.Add(table);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -80,7 +103,53 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected string ConvertSteelType(object SteelType)
|
||||||
|
{
|
||||||
|
string name = string.Empty;
|
||||||
|
if (SteelType != null)
|
||||||
|
{
|
||||||
|
var dropValue = BLL.DropListService.HJGL_GetSteTypeList().FirstOrDefault(x => x.Value == SteelType.ToString());
|
||||||
|
if (dropValue != null)
|
||||||
|
{
|
||||||
|
name = dropValue.Text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
string strSql = @"SELECT MaterialId,MaterialCode,MaterialType,SteelType,Remark,MaterialClass,MaterialGroup,MetalType"
|
||||||
|
+ @" FROM dbo.Base_Material WHERE 1=1 ";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.txtMaterialCode.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND MaterialCode LIKE @MaterialCode";
|
||||||
|
listStr.Add(new SqlParameter("@MaterialCode", "%" + this.txtMaterialCode.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.drpSteType.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " AND SteelType = @SteelType";
|
||||||
|
listStr.Add(new SqlParameter("@SteelType", this.drpSteType.SelectedValue));
|
||||||
|
}
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
|
||||||
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||||
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
#region 查询
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 获取按钮权限
|
#region 获取按钮权限
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取按钮权限
|
/// 获取按钮权限
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -97,7 +166,10 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion Methods
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,22 +42,58 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||||||
protected global::FineUIPro.Form SimpleForm1;
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtUnitId 控件。
|
/// drpMaterialId 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtUnitId;
|
protected global::FineUIPro.DropDownBox drpMaterialId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtMaterialId 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtMaterialId;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label Label3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtMaterialCode 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtMaterialCode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpSteType 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpSteType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnQuery 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnQuery;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtColorName 控件。
|
/// txtColorName 控件。
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<TreeNode id="8IDKGJE2-09B1-1234-VC6D-865CE48F0005" Text="管道等级" NavigateUrl="HJGL/BaseInfo/PipingClass.aspx">
|
<TreeNode id="8IDKGJE2-09B1-1234-VC6D-865CE48F0005" Text="管道等级" NavigateUrl="HJGL/BaseInfo/PipingClass.aspx">
|
||||||
</TreeNode>
|
</TreeNode>
|
||||||
<TreeNode id="8IDKGJE2-09B1-4607-BC6D-865CE48F0014" Text="管道介质" NavigateUrl="HJGL/BaseInfo/Medium.aspx"></TreeNode>
|
<TreeNode id="8IDKGJE2-09B1-4607-BC6D-865CE48F0014" Text="管道介质" NavigateUrl="HJGL/BaseInfo/Medium.aspx"></TreeNode>
|
||||||
|
<TreeNode id="F6194C00-D256-485D-9056-171FAB75928A" Text="管道颜色标识库" NavigateUrl="HJGL/BaseInfo/MaterialColor.aspx"></TreeNode>
|
||||||
</TreeNode>
|
</TreeNode>
|
||||||
<TreeNode id="8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F" Text="数据导入" NavigateUrl=""><TreeNode id="B13BFFA5-3112-4209-8562-5329B78B405C" Text="三维模型导入" NavigateUrl="HJGL/DataImport/TDMImport.aspx"></TreeNode>
|
<TreeNode id="8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F" Text="数据导入" NavigateUrl=""><TreeNode id="B13BFFA5-3112-4209-8562-5329B78B405C" Text="三维模型导入" NavigateUrl="HJGL/DataImport/TDMImport.aspx"></TreeNode>
|
||||||
<TreeNode id="5CBE9258-6FE9-47A8-BFDD-3BDD90F7DECC" Text="图纸导入" NavigateUrl="HJGL/DataImport/DrawingImport.aspx"></TreeNode>
|
<TreeNode id="5CBE9258-6FE9-47A8-BFDD-3BDD90F7DECC" Text="图纸导入" NavigateUrl="HJGL/DataImport/DrawingImport.aspx"></TreeNode>
|
||||||
@@ -11,12 +12,13 @@
|
|||||||
</TreeNode>
|
</TreeNode>
|
||||||
<TreeNode id="1EE36752-6077-47C9-AFF0-5372B862FF61" Text="管线划分" NavigateUrl="HJGL/PreDesign/PipelingDivide.aspx"></TreeNode>
|
<TreeNode id="1EE36752-6077-47C9-AFF0-5372B862FF61" Text="管线划分" NavigateUrl="HJGL/PreDesign/PipelingDivide.aspx"></TreeNode>
|
||||||
<TreeNode id="EF6B01AF-D038-4A38-BFAF-D89130D60DE6" Text="材料信息导入" NavigateUrl="HJGL/DataImport/MaterialInformation.aspx"></TreeNode>
|
<TreeNode id="EF6B01AF-D038-4A38-BFAF-D89130D60DE6" Text="材料信息导入" NavigateUrl="HJGL/DataImport/MaterialInformation.aspx"></TreeNode>
|
||||||
<TreeNode id="1E36EA73-D536-4215-BFB9-A8771937BD89" Text="工厂预制管理" NavigateUrl=""><TreeNode id="53948077-B51D-4FF3-BFB0-AB4E27C42875" Text="排产计划" NavigateUrl="HJGL/PreDesign/ProductionSchedulingPlan.aspx"></TreeNode>
|
<TreeNode id="1E36EA73-D536-4215-BFB9-A8771937BD89" Text="工厂预制管理" NavigateUrl=""><TreeNode id="0A3F6AB0-535E-489C-9F64-4FFE61C17085" Text="材料管理" NavigateUrl="HJGL/PreDesign/MaterialManage.aspx"></TreeNode>
|
||||||
|
<TreeNode id="53948077-B51D-4FF3-BFB0-AB4E27C42875" Text="排产计划" NavigateUrl="HJGL/PreDesign/ProductionSchedulingPlan.aspx"></TreeNode>
|
||||||
<TreeNode id="8255554C-0A92-4C7B-BF19-779AF0220A8C" Text="预制组件管理" NavigateUrl="HJGL/PreDesign/PrePipeline.aspx"></TreeNode>
|
<TreeNode id="8255554C-0A92-4C7B-BF19-779AF0220A8C" Text="预制组件管理" NavigateUrl="HJGL/PreDesign/PrePipeline.aspx"></TreeNode>
|
||||||
<TreeNode id="F18CFC0E-47E0-477A-9AB3-72B88D438299" Text="堆场规划" NavigateUrl="HJGL/PreDesign/YardPlanning.aspx"></TreeNode>
|
<TreeNode id="F18CFC0E-47E0-477A-9AB3-72B88D438299" Text="堆场规划" NavigateUrl="HJGL/PreDesign/YardPlanning.aspx"></TreeNode>
|
||||||
<TreeNode id="BD9C587E-17C2-49F1-82AE-A05117E41D89" Text="安装清单" NavigateUrl="HJGL/PreDesign/InstallList.aspx"></TreeNode>
|
<TreeNode id="BD9C587E-17C2-49F1-82AE-A05117E41D89" Text="安装清单" NavigateUrl="HJGL/PreDesign/InstallList.aspx"></TreeNode>
|
||||||
<TreeNode id="25DED954-10C9-47CC-99F2-C44FDE9E0A81" Text="包装管理" NavigateUrl="HJGL/PreDesign/PackagingManage.aspx"></TreeNode>
|
|
||||||
<TreeNode id="EEC0D060-C15E-4D25-B015-C2B91F735DAC" Text="发货管理" NavigateUrl="HJGL/PreDesign/TrainNumberManager.aspx"></TreeNode>
|
<TreeNode id="EEC0D060-C15E-4D25-B015-C2B91F735DAC" Text="发货管理" NavigateUrl="HJGL/PreDesign/TrainNumberManager.aspx"></TreeNode>
|
||||||
|
<TreeNode id="25DED954-10C9-47CC-99F2-C44FDE9E0A81" Text="包装管理" NavigateUrl="HJGL/PreDesign/PackagingManage.aspx"></TreeNode>
|
||||||
</TreeNode>
|
</TreeNode>
|
||||||
<TreeNode id="9B828E92-733B-4AF9-9DD0-55ECD8B64AB8" Text="材料管理" NavigateUrl=""><TreeNode id="E29C1839-3530-45EC-A752-B26A0027E2CD" Text="入库管理" NavigateUrl=""><TreeNode id="324C72AF-447A-4308-AFB7-ABF788C58240" Text="入库申请" NavigateUrl="CLGL/InPlanMaster.aspx"></TreeNode>
|
<TreeNode id="9B828E92-733B-4AF9-9DD0-55ECD8B64AB8" Text="材料管理" NavigateUrl=""><TreeNode id="E29C1839-3530-45EC-A752-B26A0027E2CD" Text="入库管理" NavigateUrl=""><TreeNode id="324C72AF-447A-4308-AFB7-ABF788C58240" Text="入库申请" NavigateUrl="CLGL/InPlanMaster.aspx"></TreeNode>
|
||||||
<TreeNode id="4A55351A-2440-4A2D-8509-3FFEE5FC8861" Text="入库单管理" NavigateUrl="CLGL/InputMaster.aspx"></TreeNode>
|
<TreeNode id="4A55351A-2440-4A2D-8509-3FFEE5FC8861" Text="入库单管理" NavigateUrl="CLGL/InputMaster.aspx"></TreeNode>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
public class BaseMaterialcolorOutput
|
||||||
|
{
|
||||||
|
public string MaterialColorId { get; set; }
|
||||||
|
public string UnitId { get; set; }
|
||||||
|
public string ProjectId { get; set; }
|
||||||
|
public string MaterialId { get; set; }
|
||||||
|
public string MaterialCode { get; set; }
|
||||||
|
public string ColorName { get; set; }
|
||||||
|
public string ColorCardNo { get; set; }
|
||||||
|
public string RGB { get; set; }
|
||||||
|
public string Remark { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22438,6 +22438,8 @@ namespace Model
|
|||||||
|
|
||||||
private string _UnitId;
|
private string _UnitId;
|
||||||
|
|
||||||
|
private string _ProjectId;
|
||||||
|
|
||||||
private string _MaterialId;
|
private string _MaterialId;
|
||||||
|
|
||||||
private string _ColorName;
|
private string _ColorName;
|
||||||
@@ -22456,6 +22458,8 @@ namespace Model
|
|||||||
partial void OnMaterialColorIdChanged();
|
partial void OnMaterialColorIdChanged();
|
||||||
partial void OnUnitIdChanging(string value);
|
partial void OnUnitIdChanging(string value);
|
||||||
partial void OnUnitIdChanged();
|
partial void OnUnitIdChanged();
|
||||||
|
partial void OnProjectIdChanging(string value);
|
||||||
|
partial void OnProjectIdChanged();
|
||||||
partial void OnMaterialIdChanging(string value);
|
partial void OnMaterialIdChanging(string value);
|
||||||
partial void OnMaterialIdChanged();
|
partial void OnMaterialIdChanged();
|
||||||
partial void OnColorNameChanging(string value);
|
partial void OnColorNameChanging(string value);
|
||||||
@@ -22513,6 +22517,26 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._ProjectId;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._ProjectId != value))
|
||||||
|
{
|
||||||
|
this.OnProjectIdChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._ProjectId = value;
|
||||||
|
this.SendPropertyChanged("ProjectId");
|
||||||
|
this.OnProjectIdChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialId", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialId", DbType="NVarChar(50)")]
|
||||||
public string MaterialId
|
public string MaterialId
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -233,6 +233,7 @@
|
|||||||
<Compile Include="FastReportItem.cs" />
|
<Compile Include="FastReportItem.cs" />
|
||||||
<Compile Include="HandleStep.cs" />
|
<Compile Include="HandleStep.cs" />
|
||||||
<Compile Include="HJGL\3DParameter.cs" />
|
<Compile Include="HJGL\3DParameter.cs" />
|
||||||
|
<Compile Include="HJGL\BaseMaterialcolorOutput.cs" />
|
||||||
<Compile Include="HJGL\MaterialStockItem.cs" />
|
<Compile Include="HJGL\MaterialStockItem.cs" />
|
||||||
<Compile Include="APIItem\HJGL\PackagingManageItem.cs" />
|
<Compile Include="APIItem\HJGL\PackagingManageItem.cs" />
|
||||||
<Compile Include="HJGL\PackagingManagePrintOutput.cs" />
|
<Compile Include="HJGL\PackagingManagePrintOutput.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user