20241213 Key Quantity
This commit is contained in:
parent
6387cf58bc
commit
90c2df3d24
|
@ -158,6 +158,7 @@
|
|||
<Compile Include="BaseInfo\DepartService.cs" />
|
||||
<Compile Include="BaseInfo\DisciplinesWBSService.cs" />
|
||||
<Compile Include="BaseInfo\HyperLinkSetService.cs" />
|
||||
<Compile Include="BaseInfo\QuantityDesctiptionService.cs" />
|
||||
<Compile Include="Common\AttachFileService.cs" />
|
||||
<Compile Include="Common\ChartControlService.cs" />
|
||||
<Compile Include="Common\ConstValue.cs" />
|
||||
|
@ -165,6 +166,7 @@
|
|||
<Compile Include="Common\HttpHelper.cs" />
|
||||
<Compile Include="Design\DesignInputService.cs" />
|
||||
<Compile Include="EditorManage\CMHTDService.cs" />
|
||||
<Compile Include="EditorManage\KeyQuantityService.cs" />
|
||||
<Compile Include="SyncFilePathHelper.cs" />
|
||||
<Compile Include="Common\HashtableHelper.cs" />
|
||||
<Compile Include="Common\JsonHelper.cs" />
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class QuantityDesctiptionService
|
||||
{
|
||||
public static Model.Base_QuantityDesctiption GetQuantityDesctiptionById(string keyId)
|
||||
{
|
||||
return Funs.DB.Base_QuantityDesctiption.FirstOrDefault(e => e.KeyId == keyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加
|
||||
/// </summary>
|
||||
/// <param name="des"></param>
|
||||
public static void AddQuantityDesctiption(Model.Base_QuantityDesctiption des)
|
||||
{
|
||||
Model.Base_QuantityDesctiption newDes = new Model.Base_QuantityDesctiption();
|
||||
newDes.KeyId = des.KeyId;
|
||||
newDes.DepartId = des.DepartId;
|
||||
newDes.DisciplinesWBSId = des.DisciplinesWBSId;
|
||||
newDes.QuantityDesctiption = des.QuantityDesctiption;
|
||||
newDes.PlanMHRsUnit = des.PlanMHRsUnit;
|
||||
Funs.DB.Base_QuantityDesctiption.InsertOnSubmit(newDes);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="des"></param>
|
||||
public static void UpdateQuantityDesctiption(Model.Base_QuantityDesctiption des)
|
||||
{
|
||||
Model.Base_QuantityDesctiption newDes = Funs.DB.Base_QuantityDesctiption.FirstOrDefault(e => e.KeyId == des.KeyId);
|
||||
if (newDes != null)
|
||||
{
|
||||
newDes.DepartId = des.DepartId;
|
||||
newDes.DisciplinesWBSId = des.DisciplinesWBSId;
|
||||
newDes.QuantityDesctiption = des.QuantityDesctiption;
|
||||
newDes.PlanMHRsUnit = des.PlanMHRsUnit;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="keyId"></param>
|
||||
public static void DeleteQuantityDesctiptionById(string keyId)
|
||||
{
|
||||
Model.Base_QuantityDesctiption newDes = Funs.DB.Base_QuantityDesctiption.FirstOrDefault(e => e.KeyId == keyId);
|
||||
if (newDes != null)
|
||||
{
|
||||
Funs.DB.Base_QuantityDesctiption.DeleteOnSubmit(newDes);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证是否存在
|
||||
/// </summary>
|
||||
/// <param name="departId"></param>
|
||||
/// <param name="DisciplinesWBSId"></param>
|
||||
/// <param name="quantityDesctiption"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitQuantityDesctiption(string departId, string DisciplinesWBSId, string quantityDesctiption, string id)
|
||||
{
|
||||
var q = Funs.DB.Base_QuantityDesctiption.FirstOrDefault(x => x.DepartId == departId && x.DisciplinesWBSId == DisciplinesWBSId && x.QuantityDesctiption == quantityDesctiption && x.KeyId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -299,6 +299,12 @@ namespace BLL
|
|||
/// 超链接设置
|
||||
/// </summary>
|
||||
public const string HyperLinkSetMenuId = "CE289C0B-7E32-4DD3-B02E-60368EE47CCB";
|
||||
|
||||
/// <summary>
|
||||
/// Key Quantity-QuantityDesctiption
|
||||
/// </summary>
|
||||
public const string QuantityDesctiptionMenuId = "17E4B346-13C4-4751-8C8A-8F8A3C7CF9DD";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 编辑器
|
||||
|
@ -356,6 +362,11 @@ namespace BLL
|
|||
/// 成本报告
|
||||
/// </summary>
|
||||
public const string CostReportMenuId = "02069175-4901-4325-8019-3442D409233E";
|
||||
|
||||
/// <summary>
|
||||
/// Key Quantity Editor
|
||||
/// </summary>
|
||||
public const string KeyQuantityMenuId = "070C3436-1408-430B-B8BD-C6D2CCB80103";
|
||||
#endregion
|
||||
|
||||
#region 资源计划
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// Key Quantity
|
||||
/// </summary>
|
||||
public class KeyQuantityService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取Key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantityId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Editor_KeyQuantity GetKeyQuantityById(string keyQuantityId)
|
||||
{
|
||||
return Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantityId);
|
||||
}
|
||||
|
||||
public static decimal? GetSumPlanMHRsByKeyId(string keyId)
|
||||
{
|
||||
decimal? sum = 0;
|
||||
sum = (from x in Funs.DB.Editor_KeyQuantity where x.KeyId == keyId select x.PlanMHRs).Sum();
|
||||
return sum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加Key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantity"></param>
|
||||
public static void AddKeyQuantity(Model.Editor_KeyQuantity keyQuantity)
|
||||
{
|
||||
Model.Editor_KeyQuantity newKeyQuantity = new Model.Editor_KeyQuantity();
|
||||
newKeyQuantity.KeyQuantityId = keyQuantity.KeyQuantityId;
|
||||
newKeyQuantity.EProjectId = keyQuantity.EProjectId;
|
||||
newKeyQuantity.KeyId = keyQuantity.KeyId;
|
||||
newKeyQuantity.InputQuantity = keyQuantity.InputQuantity;
|
||||
newKeyQuantity.PlanMHRs = keyQuantity.PlanMHRs;
|
||||
Funs.DB.Editor_KeyQuantity.InsertOnSubmit(newKeyQuantity);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantity"></param>
|
||||
public static void UpdateKeyQuantity(Model.Editor_KeyQuantity keyQuantity)
|
||||
{
|
||||
Model.Editor_KeyQuantity newKeyQuantity = Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantity.KeyQuantityId);
|
||||
if (newKeyQuantity != null)
|
||||
{
|
||||
newKeyQuantity.KeyId = keyQuantity.KeyId;
|
||||
newKeyQuantity.InputQuantity = keyQuantity.InputQuantity;
|
||||
newKeyQuantity.PlanMHRs = keyQuantity.PlanMHRs;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除Key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantityId"></param>
|
||||
public static void DeleteKeyQuantityById(string keyQuantityId)
|
||||
{
|
||||
Model.Editor_KeyQuantity keyQuantity = Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantityId);
|
||||
if (keyQuantity != null)
|
||||
{
|
||||
Funs.DB.Editor_KeyQuantity.DeleteOnSubmit(keyQuantity);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -413,6 +413,15 @@ namespace BLL
|
|||
return (from x in Funs.DB.View_Sys_Users where x.IsPost == true orderby x.DepartName, x.UserName select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有用户列表信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.View_Sys_Users> GetAllUserViewList()
|
||||
{
|
||||
return (from x in Funs.DB.View_Sys_Users orderby x.DepartName, x.UserName select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// »ñÈ¡CTEÓû§
|
||||
/// </summary>
|
||||
|
@ -448,7 +457,7 @@ namespace BLL
|
|||
dropName.DataGroupField = "DepartName";
|
||||
dropName.DataValueField = "UserId";
|
||||
dropName.DataTextField = "UserName";
|
||||
dropName.DataSource = BLL.Sys_UserService.GetUserViewList();
|
||||
dropName.DataSource = BLL.Sys_UserService.GetAllUserViewList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QuantityDesctiption.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.QuantityDesctiption" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Key Quantity-QuantityDesctiption</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="DisciplinesWBS" Layout="HBox" ShowHeader="false" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="Quantity Desctiption" ShowHeader="false" EnableCollapse="true" PageSize="15" EnableColumnLines="true"
|
||||
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="900px"
|
||||
DataKeyNames="KeyId" DataIDField="KeyId" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True" SortField="DepartId,DisciplinesWBSId" EnableRowSelectEvent="true" OnRowSelect="Grid1_RowSelect">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpDepartmentIdS" runat="server" Label="Department" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpDescipline" runat="server" Label="Descipline" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged"></f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" Width="40px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField Width="110px" ColumnID="DepartName" DataField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="PlanMHRsUnit" DataField="PlanMHRsUnit"
|
||||
FieldType="String" HeaderText="Plan MHRs/Unit" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
<%--<f:Listener Event="dataload" Handler="onGridDataLoad" />--%>
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="Number of records per page:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
|
||||
LabelWidth="80px" BodyPadding="5px" Width="300px">
|
||||
<Items>
|
||||
<f:HiddenField ID="hfFormID" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:DropDownList ID="drpDepartId" runat="server" Label="Type" LabelAlign="Right" LabelWidth="120px" EnableEdit="true" Required="true" ShowRedStar="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpDisciplinesWBSId" runat="server" Label="Descipline" LabelAlign="Right" LabelWidth="120px" EnableEdit="true" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpDisciplinesWBSId_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:TextBox ID="txtDisciplinesWBSCode" Label="Identifier" ShowRedStar="true" Required="true"
|
||||
runat="server" LabelAlign="right" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextArea ID="txtQuantityDesctiption" Label="Quantity Desctiption" ShowRedStar="true" Required="true"
|
||||
runat="server" LabelAlign="right" LabelWidth="120px" MaxLength="200">
|
||||
</f:TextArea>
|
||||
<f:NumberBox ID="txtPlanMHRsUnit" runat="server" Label="Plan MHRs/Unit" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
</Items>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAdd" Icon="Add" Text="Add" ToolTip="Add" runat="server" OnClick="btnAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" Enabled="false" Text="Delete" ToolTip="Delete" Icon="Delete" ConfirmText="Make sure to delete the current data?"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" Text="Save" ToolTip="Save" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:SimpleForm>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
Icon="BulletEdit" runat="server" Text="Modify">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="Delete selected row?" ConfirmTarget="Top" runat="server" Text="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
//function onGridDataLoad(event) {
|
||||
// this.mergeColumns(['DepartName']);
|
||||
//}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,374 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
using static NPOI.HSSF.Util.HSSFColor;
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
public partial class QuantityDesctiption : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();//按钮权限
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
//部门(查询)
|
||||
this.drpDepartmentIdS.DataTextField = "DepartName";
|
||||
this.drpDepartmentIdS.DataValueField = "DepartId";
|
||||
this.drpDepartmentIdS.DataSource = BLL.DepartService.GetDepartList();
|
||||
this.drpDepartmentIdS.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpDepartmentIdS);
|
||||
|
||||
//部门
|
||||
this.drpDepartId.DataTextField = "DepartName";
|
||||
this.drpDepartId.DataValueField = "DepartId";
|
||||
this.drpDepartId.DataSource = BLL.DepartService.GetDepartList();
|
||||
this.drpDepartId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpDepartId);
|
||||
|
||||
//专业(查询)
|
||||
this.drpDescipline.DataTextField = "DisciplinesWBSName";
|
||||
this.drpDescipline.DataValueField = "DisciplinesWBSId";
|
||||
this.drpDescipline.DataSource = from x in Funs.DB.Base_DisciplinesWBS select x;
|
||||
this.drpDepartId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpDescipline);
|
||||
|
||||
//专业
|
||||
this.drpDisciplinesWBSId.DataTextField = "DisciplinesWBSName";
|
||||
this.drpDisciplinesWBSId.DataValueField = "DisciplinesWBSId";
|
||||
this.drpDisciplinesWBSId.DataSource = from x in Funs.DB.Base_DisciplinesWBS select x;
|
||||
this.drpDisciplinesWBSId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpDisciplinesWBSId);
|
||||
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT qua.KeyId,
|
||||
qua.DepartId,
|
||||
qua.DisciplinesWBSId,
|
||||
qua.QuantityDesctiption,
|
||||
qua.PlanMHRsUnit,
|
||||
d.DepartName,
|
||||
wbs.DisciplinesWBSCode,
|
||||
wbs.DisciplinesWBSName
|
||||
FROM Base_QuantityDesctiption as qua
|
||||
left join Base_Depart as d on d.DepartId = qua.DepartId
|
||||
left join Base_DisciplinesWBS as wbs on wbs.DisciplinesWBSId = qua.DisciplinesWBSId where 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpDepartmentIdS.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDepartmentIdS.SelectedValue))
|
||||
{
|
||||
strSql += " AND qua.DepartId=@DepartId ";
|
||||
listStr.Add(new SqlParameter("@DepartId", this.drpDepartmentIdS.SelectedValue));
|
||||
}
|
||||
if (this.drpDescipline.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDescipline.SelectedValue))
|
||||
{
|
||||
strSql += " AND qua.DisciplinesWBSId=@disciplinesWBSId ";
|
||||
listStr.Add(new SqlParameter("@disciplinesWBSId", this.drpDescipline.SelectedValue));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页下拉选择
|
||||
/// <summary>
|
||||
/// 分页下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 增加
|
||||
/// <summary>
|
||||
/// 增加按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
EmptyText();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 清空文本框
|
||||
/// <summary>
|
||||
/// 清空文本框
|
||||
/// </summary>
|
||||
private void EmptyText()
|
||||
{
|
||||
this.hfFormID.Text = string.Empty;
|
||||
this.drpDepartId.SelectedValue = Const._Null;
|
||||
this.drpDisciplinesWBSId.SelectedValue = Const._Null;
|
||||
this.txtDisciplinesWBSCode.Text = string.Empty;
|
||||
this.txtQuantityDesctiption.Text = string.Empty;
|
||||
this.txtPlanMHRsUnit.Text = string.Empty;
|
||||
this.btnDelete.Enabled = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 选择行事件
|
||||
/// <summary>
|
||||
/// 选择行事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowSelect(object sender, GridRowSelectEventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
BLL.QuantityDesctiptionService.DeleteQuantityDesctiptionById(hfFormID.Text);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Delete the Key Quantity-QuantityDesctiption");
|
||||
// 重新绑定表格,并模拟点击[新增按钮]
|
||||
BindGrid();
|
||||
//PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
private void DeleteData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
|
||||
BLL.QuantityDesctiptionService.DeleteQuantityDesctiptionById(rowID);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Delete the Key Quantity-QuantityDesctiption");
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
EmptyText();
|
||||
//PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("Please select at least one record!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
var cons = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(Id);
|
||||
if (cons != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(cons.DepartId))
|
||||
{
|
||||
this.drpDepartId.SelectedValue = cons.DepartId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cons.DisciplinesWBSId))
|
||||
{
|
||||
this.drpDisciplinesWBSId.SelectedValue = cons.DisciplinesWBSId;
|
||||
var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(cons.DisciplinesWBSId);
|
||||
if (wbs != null)
|
||||
{
|
||||
this.txtDisciplinesWBSCode.Text = wbs.DisciplinesWBSCode;
|
||||
}
|
||||
this.txtQuantityDesctiption.Text = cons.QuantityDesctiption;
|
||||
this.txtPlanMHRsUnit.Text = cons.PlanMHRsUnit.HasValue ? cons.PlanMHRsUnit.ToString() : "";
|
||||
}
|
||||
hfFormID.Text = Id;
|
||||
this.btnDelete.Enabled = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string strRowID = hfFormID.Text;
|
||||
//if (this.drpDepartId.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// ShowNotify("Please select Department!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.drpDisciplinesWBSId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("Please select Descipline!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!BLL.QuantityDesctiptionService.IsExitQuantityDesctiption(this.drpDepartId.SelectedValue, this.drpDisciplinesWBSId.SelectedValue, this.txtQuantityDesctiption.Text.Trim(), strRowID))
|
||||
{
|
||||
Model.Base_QuantityDesctiption cons = new Model.Base_QuantityDesctiption
|
||||
{
|
||||
QuantityDesctiption = this.txtQuantityDesctiption.Text.Trim(),
|
||||
PlanMHRsUnit = Funs.GetNewDecimal(this.txtPlanMHRsUnit.Text)
|
||||
};
|
||||
|
||||
if (this.drpDepartId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDepartId.SelectedValue))
|
||||
{
|
||||
cons.DepartId = this.drpDepartId.SelectedValue;
|
||||
}
|
||||
if (this.drpDisciplinesWBSId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDisciplinesWBSId.SelectedValue))
|
||||
{
|
||||
cons.DisciplinesWBSId = this.drpDisciplinesWBSId.SelectedValue;
|
||||
}
|
||||
if (string.IsNullOrEmpty(strRowID))
|
||||
{
|
||||
cons.KeyId = SQLHelper.GetNewID(typeof(Model.Base_QuantityDesctiption));
|
||||
BLL.QuantityDesctiptionService.AddQuantityDesctiption(cons);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add the Key Quantity-QuantityDesctiption");
|
||||
ShowNotify("Save Successfully!", MessageBoxIcon.Success);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
cons.KeyId = strRowID;
|
||||
BLL.QuantityDesctiptionService.UpdateQuantityDesctiption(cons);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify the Key Quantity-QuantityDesctiption");
|
||||
ShowNotify("Save Successfully!", MessageBoxIcon.Success);
|
||||
}
|
||||
this.SimpleForm1.Reset();
|
||||
// 重新绑定表格,并点击当前编辑或者新增的行
|
||||
BindGrid();
|
||||
//PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, cons.DisciplinesWBSId));
|
||||
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("The Quantity Desctiption already exists!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Text_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
/// <summary>
|
||||
/// 菜单按钮权限
|
||||
/// </summary>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.QuantityDesctiptionMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnAdd.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void drpDisciplinesWBSId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtDisciplinesWBSCode.Text = string.Empty;
|
||||
if (this.drpDisciplinesWBSId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDisciplinesWBSId.SelectedValue))
|
||||
{
|
||||
var dis = BLL.DisciplinesWBSService.GetDisciplinesWBSById(this.drpDisciplinesWBSId.SelectedValue);
|
||||
if (dis != null)
|
||||
{
|
||||
this.txtDisciplinesWBSCode.Text = dis.DisciplinesWBSCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,242 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class QuantityDesctiption
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpDepartmentIdS 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDepartmentIdS;
|
||||
|
||||
/// <summary>
|
||||
/// drpDescipline 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDescipline;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// hfFormID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hfFormID;
|
||||
|
||||
/// <summary>
|
||||
/// drpDepartId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDepartId;
|
||||
|
||||
/// <summary>
|
||||
/// drpDisciplinesWBSId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDisciplinesWBSId;
|
||||
|
||||
/// <summary>
|
||||
/// txtDisciplinesWBSCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDisciplinesWBSCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtQuantityDesctiption 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtQuantityDesctiption;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanMHRsUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPlanMHRsUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
<f:FormRow ColumnWidths="25% 24% 27% 24%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtJobNo" runat="server" Label="Job No." LabelWidth="120px" Readonly="true"></f:TextBox>
|
||||
<f:TextBox ID="txtNotesLink" runat="server" Label="Notes Link" LabelWidth="120px" Readonly="true"></f:TextBox>
|
||||
<f:TextBox ID="txtNotesLink" runat="server" Label="SharePoint Link" LabelWidth="120px" Readonly="true"></f:TextBox>
|
||||
<f:TextBox ID="txtProjectManager" runat="server" Label="Project Manager" LabelWidth="160px" Readonly="true"></f:TextBox>
|
||||
<f:TextBox ID="txtAccount" runat="server" Label="Account No." LabelWidth="130px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
|
@ -966,6 +966,60 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanelKeyQuantity" runat="server" Title="Key Quantity Editor" EnableCollapse="true">
|
||||
<Items>
|
||||
<f:Grid ID="GridKeyQuantity" ShowBorder="true" ShowHeader="false" Title="Key Quantity Editor" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="KeyQuantityId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="KeyQuantityId" AllowSorting="true" SortField="DepartName,DisciplinesWBSName"
|
||||
SortDirection="ASC" OnSort="GridKeyQuantity_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="GridKeyQuantity_PageIndexChange">
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
SortField="DisciplinesWBSCode" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="InputQuantity" DataField="InputQuantity"
|
||||
FieldType="String" HeaderText="Input Quantity" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsUnit" DataField="PlanMHRsUnit"
|
||||
FieldType="String" HeaderText="Plan MHRs/Unit" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="PlanMHRs" DataField="PlanMHRs"
|
||||
FieldType="String" HeaderText="Plan MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsSummary" DataField="PlanMHRsSummary"
|
||||
FieldType="String" HeaderText="Plan MHRs Summary" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ActualMHRs" DataField="ActualMHRs"
|
||||
FieldType="String" HeaderText="Actual MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator6" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText6" runat="server" Text="Number of records per page:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlKeyQuantity" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlKeyQuantity_SelectedIndexChanged">
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
|
|
|
@ -406,6 +406,10 @@ namespace FineUIPro.Web.EditorManage
|
|||
#region FCR Log
|
||||
BindGridFCRLog();
|
||||
#endregion
|
||||
|
||||
#region Key Quantity
|
||||
BindGridKeyQuantity();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -698,6 +702,58 @@ namespace FineUIPro.Web.EditorManage
|
|||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Key Quantity
|
||||
private void BindGridKeyQuantity()
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@eprojectId", Request.Params["eProjectId"])
|
||||
};
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Proc_KeyQuantityLists", parameter);
|
||||
this.GridKeyQuantity.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(GridKeyQuantity, tb);
|
||||
GridKeyQuantity.DataSource = table;
|
||||
GridKeyQuantity.DataBind();
|
||||
}
|
||||
|
||||
#region 分页、排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void GridKeyQuantity_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
GridKeyQuantity.PageIndex = e.NewPageIndex;
|
||||
BindGridKeyQuantity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlKeyQuantity_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
GridKeyQuantity.PageSize = Convert.ToInt32(ddlKeyQuantity.SelectedValue);
|
||||
BindGridKeyQuantity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void GridKeyQuantity_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
GridKeyQuantity.SortDirection = e.SortDirection;
|
||||
GridKeyQuantity.SortField = e.SortField;
|
||||
BindGridKeyQuantity();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,214 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KeyQuantityEditor.aspx.cs" Inherits="FineUIPro.Web.EditorManage.KeyQuantityEditor" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Key Quantity Editor</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="Key Quantity Editor" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="EProjectId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="EProjectId" AllowSorting="true" SortField="ProjectControl_JobNo"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort" EnableRowSelectEvent="true" OnRowSelect="Grid1_RowSelect"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true" AllowFilters="true" OnFilterChange="Grid1_FilterChange">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpJobType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drpJobType_SelectedIndexChanged" NextFocusControl="btnSearch"></f:DropDownList>
|
||||
<f:DropDownList ID="drpJobStatus" runat="server" NextFocusControl="btnSearch"></f:DropDownList>
|
||||
<f:TextBox ID="txtJobNO" runat="server" EmptyText="Enter the Job No." AutoPostBack="true" NextFocusControl="btnSearch"></f:TextBox>
|
||||
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" Text="Search" OnClick="btnSearch_Click"></f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnEdit" ToolTip="Modify" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Text="Edit" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField Width="50px" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" EnableFilter="true"
|
||||
SortField="ProjectControl_JobNo" FieldType="String" HeaderText="Job No." HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList1" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobType" DataField="ProjectControl_JobType" SortField="ProjectControl_JobType"
|
||||
FieldType="String" HeaderText="Job Type" HeaderTextAlign="Center" EnableFilter="true">
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList2" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="ProjectControl_JobTitle" DataField="ProjectControl_JobTitle" SortField="ProjectControl_JobTitle"
|
||||
FieldType="String" HeaderText="Job Title" HeaderTextAlign="Center" ExpandUnusedSpace="true" EnableFilter="true">
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList3" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobStatus" DataField="ProjectControl_JobStatus" SortField="ProjectControl_JobStatus"
|
||||
FieldType="String" HeaderText="Job Status" HeaderTextAlign="Center" EnableFilter="true">
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList4" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_BUCode" DataField="ProjectControl_BUCode"
|
||||
FieldType="String" HeaderText="Bu.Code" HeaderTextAlign="Center" EnableFilter="true">
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList5" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="PM_General_Priority" DataField="PM_General_Priority"
|
||||
FieldType="String" HeaderText="Priority" HeaderTextAlign="Center" EnableFilter="true" >
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList6" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="PM_General_Category" DataField="PM_General_Category"
|
||||
FieldType="String" HeaderText="Category" HeaderTextAlign="Center" EnableFilter="true">
|
||||
<Filter EnableMultiFilter="true" ShowMatcher="true">
|
||||
<Operator>
|
||||
<f:DropDownList ID="DropDownList7" runat="server">
|
||||
<f:ListItem Text="equal to" Value="equal" />
|
||||
<f:ListItem Text="include" Value="contain" Selected="true" />
|
||||
</f:DropDownList>
|
||||
</Operator>
|
||||
</Filter>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="Number of records per page:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="Key Quantity" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="KeyQuantityId" AllowCellEditing="true" EnableColumnLines="true" DataIDField="KeyQuantityId" AllowSorting="true" SortField="DepartName,DisciplinesWBSName"
|
||||
SortDirection="ASC" OnSort="Grid2_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid2_PageIndexChange" EnableTextSelection="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="140px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
SortField="DisciplinesWBSCode" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="InputQuantity" DataField="InputQuantity"
|
||||
FieldType="String" HeaderText="Input Quantity" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsUnit" DataField="PlanMHRsUnit"
|
||||
FieldType="String" HeaderText="Plan MHRs/Unit" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="PlanMHRs" DataField="PlanMHRs"
|
||||
FieldType="String" HeaderText="Plan MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsSummary" DataField="PlanMHRsSummary"
|
||||
FieldType="String" HeaderText="Plan MHRs Summary" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ActualMHRs" DataField="ActualMHRs"
|
||||
FieldType="String" HeaderText="Actual MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText2" runat="server" Text="Number of records per page:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize2" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize2_SelectedIndexChanged">
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="Key Quantity Editor" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
Icon="BulletEdit" runat="server" Text="Modify" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuView" OnClick="btnMenuView_Click" EnablePostBack="true"
|
||||
Icon="Find" runat="server" Text="View">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,460 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
public partial class KeyQuantityEditor : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// 表头过滤
|
||||
FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();//权限设置
|
||||
|
||||
//项目类型
|
||||
this.drpJobType.DataTextField = "ConstText";
|
||||
this.drpJobType.DataValueField = "ConstValue";
|
||||
this.drpJobType.DataSource = BLL.ConstService.GetConstListByGroupId(BLL.Const.ProjectPlanner_JobType);
|
||||
this.drpJobType.DataBind();
|
||||
Funs.FineUIPleaseSelectJobType(this.drpJobType);
|
||||
|
||||
//项目状态
|
||||
this.drpJobStatus.DataTextField = "ConstText";
|
||||
this.drpJobStatus.DataValueField = "ConstValue";
|
||||
this.drpJobStatus.DataSource = BLL.ConstService.GetConstListByGroupId(BLL.Const.ProjectPlanner_JobStatus);
|
||||
this.drpJobStatus.DataBind();
|
||||
Funs.FineUIPleaseSelectJobStatus(this.drpJobStatus);
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "SELECT EProjectId," +
|
||||
"ProjectControl_JobNo," +
|
||||
"ProjectControl_JobType," +
|
||||
"ProjectControl_JobStatus," +
|
||||
"ProjectControl_JobTitle," +
|
||||
"ProjectControl_BUCode," +
|
||||
"PM_General_Priority," +
|
||||
"PM_General_Category " +
|
||||
"FROM dbo.Editor_EProject WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpJobType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND ProjectControl_JobType=@JobType ";
|
||||
listStr.Add(new SqlParameter("@JobType", this.drpJobType.SelectedItem.Text));
|
||||
}
|
||||
if (this.drpJobStatus.SelectedValue != BLL.Const._Null && this.drpJobStatus.SelectedValue != null)
|
||||
{
|
||||
strSql += " AND ProjectControl_JobStatus=@Status ";
|
||||
listStr.Add(new SqlParameter("@Status", this.drpJobStatus.SelectedItem.Text));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtJobNO.Text.Trim()))
|
||||
{
|
||||
strSql += " AND ProjectControl_JobNo LIKE @jobNO ";
|
||||
listStr.Add(new SqlParameter("@jobNO", this.txtJobNO.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 过滤表头
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据表头信息过滤列表数据
|
||||
/// </summary>
|
||||
/// <param name="sourceObj"></param>
|
||||
/// <param name="fillteredOperator"></param>
|
||||
/// <param name="fillteredObj"></param>
|
||||
/// <param name="column"></param>
|
||||
/// <returns></returns>
|
||||
private bool FilterDataRowItemImplement(object sourceObj, string fillteredOperator, object fillteredObj, string column)
|
||||
{
|
||||
bool valid = false;
|
||||
if (column == "ProjectControl_JobNo")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if (column == "ProjectControl_JobType")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if (column == "ProjectControl_JobTitle")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if (column == "ProjectControl_JobStatus")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if (column == "ProjectControl_BUCode")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if (column == "PM_General_Priority")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if (column == "PM_General_Category")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal" && sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
else if (fillteredOperator == "contain" && sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("Please select at least one record!");
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
var eproject = BLL.EProjectService.GeteProjectById(Id);
|
||||
if (eproject != null)
|
||||
{
|
||||
Window1.Title = "Key Quantity Editor(Job No. " + eproject.ProjectControl_JobNo + ")";
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("KeyQuantityEditorList.aspx?eProjectId={0}", Id, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnEdit_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnEdit_Click(null, null);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
protected void drpJobType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpJobStatus.Items.Clear();
|
||||
if (drpJobType.SelectedText == "Other")
|
||||
{
|
||||
BLL.ConstService.InitConstValueProjectStatus(this.drpJobStatus, BLL.Const.ProjectPlanner_JobStatus, "3", true);
|
||||
}
|
||||
if (drpJobType.SelectedText != "Other")
|
||||
{
|
||||
BLL.ConstService.InitConstValueProjectStatus(this.drpJobStatus, BLL.Const.ProjectPlanner_JobStatus, "2", true);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 下拉框选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
/// <summary>
|
||||
/// 菜单按钮权限
|
||||
/// </summary>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.KeyQuantityMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
this.Grid1.EnableRowDoubleClickEvent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 点击Grid1加载Grid2
|
||||
/// <summary>
|
||||
/// Grid1行选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowSelect(object sender, GridRowSelectEventArgs e)
|
||||
{
|
||||
string eProjectId = this.Grid1.SelectedRowID;
|
||||
BindGrid2(eProjectId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid2(string eProjectId)
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@eprojectId", eProjectId)
|
||||
};
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Proc_KeyQuantityLists", parameter);
|
||||
this.Grid2.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid2, tb);
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
}
|
||||
|
||||
#region 分页、排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid2.PageIndex = e.NewPageIndex;
|
||||
BindGrid2(this.Grid1.SelectedRowID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid2.PageSize = Convert.ToInt32(ddlPageSize2.SelectedValue);
|
||||
BindGrid2(this.Grid1.SelectedRowID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid2_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid2.SortDirection = e.SortDirection;
|
||||
Grid2.SortField = e.SortField;
|
||||
BindGrid2(this.Grid1.SelectedRowID);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 查看
|
||||
/// <summary>
|
||||
/// 查看
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("Please select at least one record!");
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
var eproject = BLL.EProjectService.GeteProjectById(Id);
|
||||
if (eproject != null)
|
||||
{
|
||||
Window1.Title = "Key Quantity Editor(Job No. " + eproject.ProjectControl_JobNo + ")";
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("KeyQuantityEditorList.aspx?eProjectId={0}&view=1", Id, "编辑 - ")));
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
|
||||
|
||||
public partial class KeyQuantityEditor
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpJobType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJobType;
|
||||
|
||||
/// <summary>
|
||||
/// drpJobStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJobStatus;
|
||||
|
||||
/// <summary>
|
||||
/// txtJobNO 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtJobNO;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList1;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList2;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList3;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList4;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList5;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList6;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList7 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList7;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText2;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize2;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KeyQuantityEditorEdit.aspx.cs" Inherits="FineUIPro.Web.EditorManage.KeyQuantityEditorEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Key Quantity Editor Edit</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" BodyPadding="10px" Margin="0 5px 0 0" AutoScroll="true" runat="server" EnableCollapse="true" Title="FCR Log" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpKeyId" LabelWidth="120px" EmptyText="请从下拉表格中选择" Label="Type" MatchFieldWidth="false" AutoPostBack="true" OnTextChanged="drpKeyId_TextChanged">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid1" Width="650px" Height="300px" Hidden="true"
|
||||
DataIDField="KeyId" DataTextField="DepartName"
|
||||
PageSize="10" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" runat="server"
|
||||
DataKeyNames="KeyId"
|
||||
AllowSorting="true" SortField="DepartName,DisciplinesWBSName" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:BoundField Width="90px" DataField="DepartName" SortField="DepartName" HeaderText="Type" />
|
||||
<f:BoundField Width="80px" SortField="DisciplinesWBSCode" DataField="DisciplinesWBSCode" HeaderText="Identifier" />
|
||||
<f:BoundField Width="100px" SortField="DisciplinesWBSName" DataField="DisciplinesWBSName" HeaderText="Descipline" />
|
||||
<f:BoundField Width="100px" SortField="QuantityDesctiption" DataField="QuantityDesctiption" HeaderText="Quantity Desctiption" ExpandUnusedSpace="true" />
|
||||
<f:BoundField Width="100px" SortField="PlanMHRsUnit" DataField="PlanMHRsUnit" HeaderText="Plan MHRs/Unit" />
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="Number of records per page:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="5" Value="5" />
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Top">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSearch" runat="server" ShowLabel="false" EmptyText="Type" Width="300px" AutoPostBack="true" OnTextChanged="txtSearch_TextChanged"></f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
<f:TextBox ID="txtIdentifier" runat="server" Label="Identifier" LabelWidth="200px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDescipline" runat="server" Label="Descipline" LabelWidth="120px" Readonly="true"></f:TextBox>
|
||||
<f:TextBox ID="txtQuantityDesctiption" runat="server" Label="Quantity Desctiption" LabelWidth="200px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtInputQuantity" runat="server" Label="Input Quantity" LabelWidth="120px" NoNegative="true" AutoPostBack="true" OnTextChanged="txtInputQuantity_TextChanged"></f:NumberBox>
|
||||
<f:NumberBox ID="txtPlanMHRsUnit" runat="server" Label="Plan MHRs/Unit" LabelWidth="200px" Readonly="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtPlanMHRs" runat="server" Label="Plan MHRs" LabelWidth="120px" Readonly="true"></f:NumberBox>
|
||||
<f:NumberBox ID="txtPlanMHRsSummary" runat="server" Label="Plan MHRs Summary" LabelWidth="200px" Readonly="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtActualMHRs" runat="server" Label="Actual MHRs" LabelWidth="120px" Readonly="true"></f:NumberBox>
|
||||
<f:Label ID="Label1" runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="Save" ToolTip="Save" ValidateForms="Panel1"
|
||||
OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="Close" Text="Close" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,303 @@
|
|||
using BLL;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
public partial class KeyQuantityEditorEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string KeyQuantityId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["KeyQuantityId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["KeyQuantityId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
BindGrid();
|
||||
string view = Request.Params["view"];
|
||||
if (view == "1")
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetButtonPower();
|
||||
}
|
||||
this.ProjectId = Request.Params["eProjectId"];
|
||||
this.KeyQuantityId = Request.Params["keyQuantityId"];
|
||||
if (!string.IsNullOrEmpty(this.KeyQuantityId))
|
||||
{
|
||||
Model.Editor_KeyQuantity keyQuantity = BLL.KeyQuantityService.GetKeyQuantityById(this.KeyQuantityId);
|
||||
if (keyQuantity != null)
|
||||
{
|
||||
this.ProjectId = keyQuantity.EProjectId;
|
||||
this.drpKeyId.Value = keyQuantity.KeyId;
|
||||
var key = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(this.drpKeyId.Value);
|
||||
if (key != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key.DisciplinesWBSId))
|
||||
{
|
||||
var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(key.DisciplinesWBSId);
|
||||
if (wbs != null)
|
||||
{
|
||||
this.txtIdentifier.Text = wbs.DisciplinesWBSCode;
|
||||
this.txtDescipline.Text = wbs.DisciplinesWBSName;
|
||||
}
|
||||
|
||||
this.txtPlanMHRsSummary.Text = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value).ToString();
|
||||
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
where x.EProjectId == this.ProjectId
|
||||
&& x.Discipline == wbs.DisciplinesWBSName
|
||||
select x.Hours).Sum();
|
||||
this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
}
|
||||
txtQuantityDesctiption.Text = key.QuantityDesctiption;
|
||||
txtPlanMHRsUnit.Text = key.PlanMHRsUnit.HasValue ? key.PlanMHRsUnit.ToString() : "";
|
||||
}
|
||||
this.txtInputQuantity.Text = keyQuantity.InputQuantity.HasValue ? keyQuantity.InputQuantity.ToString() : "";
|
||||
this.txtPlanMHRs.Text = keyQuantity.PlanMHRs.HasValue ? keyQuantity.PlanMHRs.ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT qd.KeyId,
|
||||
qd.DepartId,
|
||||
qd.DisciplinesWBSId,
|
||||
qd.QuantityDesctiption,
|
||||
qd.PlanMHRsUnit,
|
||||
d.DepartName,
|
||||
wbs.DisciplinesWBSCode,
|
||||
wbs.DisciplinesWBSName
|
||||
FROM Base_QuantityDesctiption qd
|
||||
left join Base_Depart as d on qd.DepartId = d.DepartId
|
||||
left join Base_DisciplinesWBS as wbs on wbs.DisciplinesWBSId = qd.DisciplinesWBSId WHERE 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtSearch.Text.Trim()))
|
||||
{
|
||||
strSql += " AND d.DepartName like @DepartName ";
|
||||
listStr.Add(new SqlParameter("@DepartName", "%" + this.txtSearch.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 筛选
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtSearch_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpKeyId.Value == BLL.Const._Null || string.IsNullOrEmpty(this.drpKeyId.Value))
|
||||
{
|
||||
ShowAlert("Please select Type!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Editor_KeyQuantity newKeyQuantity = new Model.Editor_KeyQuantity();
|
||||
newKeyQuantity.KeyId = this.drpKeyId.Value;
|
||||
newKeyQuantity.InputQuantity = Funs.GetNewDecimal(this.txtInputQuantity.Text);
|
||||
newKeyQuantity.PlanMHRs = Funs.GetNewDecimal(this.txtPlanMHRs.Text);
|
||||
|
||||
if (!string.IsNullOrEmpty(this.KeyQuantityId))
|
||||
{
|
||||
newKeyQuantity.KeyQuantityId = this.KeyQuantityId;
|
||||
BLL.KeyQuantityService.UpdateKeyQuantity(newKeyQuantity);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Modify Key Quantity Editor information!");
|
||||
ShowNotify("Save Successfully!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
newKeyQuantity.EProjectId = ProjectId;
|
||||
this.KeyQuantityId = SQLHelper.GetNewID(typeof(Model.Editor_KeyQuantity));
|
||||
newKeyQuantity.KeyQuantityId = this.KeyQuantityId;
|
||||
BLL.KeyQuantityService.AddKeyQuantity(newKeyQuantity);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Add Key Quantity Editor information!");
|
||||
ShowNotify("Save Successfully!", MessageBoxIcon.Success);
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DropDownList下拉选择事件
|
||||
/// <summary>
|
||||
/// 部门下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpKeyId_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtIdentifier.Text = string.Empty;
|
||||
this.txtDescipline.Text = string.Empty;
|
||||
this.txtQuantityDesctiption.Text = string.Empty;
|
||||
this.txtPlanMHRsUnit.Text = string.Empty;
|
||||
this.txtPlanMHRsSummary.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.drpKeyId.Value))
|
||||
{
|
||||
var key = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(this.drpKeyId.Value);
|
||||
if (key != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key.DisciplinesWBSId))
|
||||
{
|
||||
var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(key.DisciplinesWBSId);
|
||||
if (wbs != null)
|
||||
{
|
||||
this.txtIdentifier.Text = wbs.DisciplinesWBSCode;
|
||||
this.txtDescipline.Text = wbs.DisciplinesWBSName;
|
||||
}
|
||||
|
||||
decimal? s = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value);
|
||||
this.txtPlanMHRsSummary.Text = (s + Funs.GetNewDecimal(this.txtPlanMHRs.Text)).ToString();
|
||||
|
||||
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
where x.EProjectId == this.ProjectId
|
||||
&& x.Discipline == wbs.DisciplinesWBSName
|
||||
select x.Hours).Sum();
|
||||
this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
}
|
||||
txtQuantityDesctiption.Text = key.QuantityDesctiption;
|
||||
txtPlanMHRsUnit.Text = key.PlanMHRsUnit.HasValue ? key.PlanMHRsUnit.ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Input Quantity输入事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtInputQuantity_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtPlanMHRs.Text = string.Empty;
|
||||
this.txtPlanMHRsSummary.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtInputQuantity.Text.Trim()))
|
||||
{
|
||||
this.txtPlanMHRs.Text = (Funs.GetNewDecimal(this.txtInputQuantity.Text) * Funs.GetNewDecimal(this.txtPlanMHRsUnit.Text)).ToString();
|
||||
|
||||
decimal? s = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value);
|
||||
if (s > 0)
|
||||
{
|
||||
this.txtPlanMHRsSummary.Text = (s + Funs.GetNewDecimal(this.txtPlanMHRs.Text)).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtPlanMHRsSummary.Text = this.txtPlanMHRs.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
/// <summary>
|
||||
/// 菜单按钮权限
|
||||
/// </summary>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.KeyQuantityMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
215
EProject/FineUIPro.Web/EditorManage/KeyQuantityEditorEdit.aspx.designer.cs
generated
Normal file
215
EProject/FineUIPro.Web/EditorManage/KeyQuantityEditorEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,215 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
|
||||
|
||||
public partial class KeyQuantityEditorEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// drpKeyId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox drpKeyId;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSearch;
|
||||
|
||||
/// <summary>
|
||||
/// txtIdentifier 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIdentifier;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescipline 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDescipline;
|
||||
|
||||
/// <summary>
|
||||
/// txtQuantityDesctiption 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtQuantityDesctiption;
|
||||
|
||||
/// <summary>
|
||||
/// txtInputQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtInputQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanMHRsUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPlanMHRsUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanMHRs 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPlanMHRs;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanMHRsSummary 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPlanMHRsSummary;
|
||||
|
||||
/// <summary>
|
||||
/// txtActualMHRs 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtActualMHRs;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KeyQuantityEditorList.aspx.cs" Inherits="FineUIPro.Web.EditorManage.KeyQuantityEditorList" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Key Quantity Editor List</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="Key Quantity" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="KeyQuantityId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="KeyQuantityId" AllowSorting="true" SortField="DepartName,DisciplinesWBSName"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnNew" ToolTip="Add" Text="Add" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" ToolTip="Modify" Text="Modify" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" ToolTip="Delete" Text="Delete" Icon="Delete" ConfirmText="Make sure to delete the current data?" OnClick="btnDelete_Click"
|
||||
runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
SortField="DisciplinesWBSCode" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="InputQuantity" DataField="InputQuantity"
|
||||
FieldType="String" HeaderText="Input Quantity" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsUnit" DataField="PlanMHRsUnit"
|
||||
FieldType="String" HeaderText="Plan MHRs/Unit" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="PlanMHRs" DataField="PlanMHRs"
|
||||
FieldType="String" HeaderText="Plan MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsSummary" DataField="PlanMHRsSummary"
|
||||
FieldType="String" HeaderText="Plan MHRs Summary" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ActualMHRs" DataField="ActualMHRs"
|
||||
FieldType="String" HeaderText="Actual MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="Number of records per page:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="Key Quantity Editor" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1000px" Height="400px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
Icon="BulletEdit" runat="server" Text="Modify" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="Delete selected row?" ConfirmTarget="Top" runat="server" Text="Delete" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuView" OnClick="btnMenuView_Click" EnablePostBack="true"
|
||||
Icon="Find" runat="server" Text="View">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,277 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
public partial class KeyQuantityEditorList : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
string view = Request.Params["view"];
|
||||
if (view == "1")
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
this.btnEdit.Hidden = true;
|
||||
this.btnMenuEdit.Hidden = true;
|
||||
this.btnDelete.Hidden = true;
|
||||
this.btnMenuDelete.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetButtonPower();//权限设置
|
||||
}
|
||||
|
||||
|
||||
btnNew.OnClientClick = Window1.GetShowReference("KeyQuantityEditorEdit.aspx?eProjectId=" + Request.Params["eProjectId"]) + "return false;";
|
||||
btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("Please select at least one item!");
|
||||
btnDelete.ConfirmText = String.Format("Are you sure you want to delete the selected <b><script>{0}</script></b> rows?", Grid1.GetSelectedCountReference());
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@eprojectId", Request.Params["eProjectId"])
|
||||
};
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Proc_KeyQuantityLists", parameter);
|
||||
this.Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除数据
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
private void DeleteData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var role = BLL.KeyQuantityService.GetKeyQuantityById(rowID);
|
||||
if (role != null)
|
||||
{
|
||||
if (judgementDelete(rowID, false))
|
||||
{
|
||||
BLL.KeyQuantityService.DeleteKeyQuantityById(rowID);
|
||||
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Delete Key Quantity Editor information");
|
||||
ShowNotify("Deleted successfully!");
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("Please select at least one record!");
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("KeyQuantityEditorEdit.aspx?keyQuantityId={0}", Id, "编辑 - ")));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnEdit_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnEdit_Click(null, null);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
/// <summary>
|
||||
/// 菜单按钮权限
|
||||
/// </summary>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.KeyQuantityMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
this.Grid1.EnableRowDoubleClickEvent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查看
|
||||
/// <summary>
|
||||
/// 查看
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("Please select at least one record!");
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("KeyQuantityEditorEdit.aspx?keyQuantityId={0}&view=1", Id, "编辑 - ")));
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
161
EProject/FineUIPro.Web/EditorManage/KeyQuantityEditorList.aspx.designer.cs
generated
Normal file
161
EProject/FineUIPro.Web/EditorManage/KeyQuantityEditorList.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,161 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
|
||||
|
||||
public partial class KeyQuantityEditorList
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
<f:FormRow ColumnWidths="25% 24% 27% 24%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtJobNo" runat="server" Label="Job No." LabelWidth="110px" ShowRedStar="true" Required="true"></f:TextBox>
|
||||
<f:TextBox ID="txtNotesLink" runat="server" Label="Notes Link" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtNotesLink" runat="server" Label="SharePoint Link" LabelWidth="120px"></f:TextBox>
|
||||
<f:DropDownList ID="drpProjectManager" runat="server" Label="Project Manager" LabelWidth="160px" EnableGroup="true" EnableEdit="true"></f:DropDownList>
|
||||
<f:TextBox ID="txtAccount" runat="server" Label="Account No." LabelWidth="130px"></f:TextBox>
|
||||
</Items>
|
||||
|
|
|
@ -232,6 +232,7 @@
|
|||
<Content Include="BaseInfo\ProjectPlannerJobStatus.aspx" />
|
||||
<Content Include="BaseInfo\ProjectPlannerJobType.aspx" />
|
||||
<Content Include="BaseInfo\PunchDetailsDiscipline.aspx" />
|
||||
<Content Include="BaseInfo\QuantityDesctiption.aspx" />
|
||||
<Content Include="BaseInfo\ResoursesClass.aspx" />
|
||||
<Content Include="BaseInfo\ResoursesDiscipline.aspx" />
|
||||
<Content Include="BaseInfo\Stage.aspx" />
|
||||
|
@ -260,6 +261,9 @@
|
|||
<Content Include="EditorManage\FCRLogEditor.aspx" />
|
||||
<Content Include="EditorManage\FCRLogEditorEdit.aspx" />
|
||||
<Content Include="EditorManage\FCRLogEditorList.aspx" />
|
||||
<Content Include="EditorManage\KeyQuantityEditor.aspx" />
|
||||
<Content Include="EditorManage\KeyQuantityEditorEdit.aspx" />
|
||||
<Content Include="EditorManage\KeyQuantityEditorList.aspx" />
|
||||
<Content Include="EditorManage\LessonsLearnedEditor.aspx" />
|
||||
<Content Include="EditorManage\LessonsLearnedEditorEdit.aspx" />
|
||||
<Content Include="EditorManage\LessonsLearnedEditorIn.aspx" />
|
||||
|
@ -981,6 +985,13 @@
|
|||
<Compile Include="BaseInfo\PunchDetailsDiscipline.aspx.designer.cs">
|
||||
<DependentUpon>PunchDetailsDiscipline.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\QuantityDesctiption.aspx.cs">
|
||||
<DependentUpon>QuantityDesctiption.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\QuantityDesctiption.aspx.designer.cs">
|
||||
<DependentUpon>QuantityDesctiption.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BaseInfo\ResoursesClass.aspx.cs">
|
||||
<DependentUpon>ResoursesClass.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -1172,6 +1183,27 @@
|
|||
<Compile Include="EditorManage\FCRLogEditorList.aspx.designer.cs">
|
||||
<DependentUpon>FCRLogEditorList.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\KeyQuantityEditor.aspx.cs">
|
||||
<DependentUpon>KeyQuantityEditor.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\KeyQuantityEditor.aspx.designer.cs">
|
||||
<DependentUpon>KeyQuantityEditor.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\KeyQuantityEditorEdit.aspx.cs">
|
||||
<DependentUpon>KeyQuantityEditorEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\KeyQuantityEditorEdit.aspx.designer.cs">
|
||||
<DependentUpon>KeyQuantityEditorEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\KeyQuantityEditorList.aspx.cs">
|
||||
<DependentUpon>KeyQuantityEditorList.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\KeyQuantityEditorList.aspx.designer.cs">
|
||||
<DependentUpon>KeyQuantityEditorList.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditorManage\LessonsLearnedEditor.aspx.cs">
|
||||
<DependentUpon>LessonsLearnedEditor.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
@ -97,11 +97,11 @@
|
|||
aTimer.Elapsed += new System.Timers.ElapsedEventHandler(MCEmial);
|
||||
}
|
||||
//填写第二张资源时,第一张资源预留一个月的时候填写人工时
|
||||
if (DateTime.Now.Hour == 10)
|
||||
if (DateTime.Now.Hour == 15)
|
||||
{
|
||||
System.Timers.Timer aTimer = new System.Timers.Timer();
|
||||
//1小时执行一次
|
||||
aTimer.Interval = 3600000;
|
||||
aTimer.Interval = 60*1000;
|
||||
aTimer.Enabled = true;
|
||||
aTimer.Start();
|
||||
aTimer.Elapsed += new System.Timers.ElapsedEventHandler(UpdateManHourDisabled);
|
||||
|
@ -351,7 +351,7 @@
|
|||
if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now)
|
||||
{
|
||||
string resourcePlanId = planLists[0].ResourcePlanId.ToString();
|
||||
List<ManHours_Plan> manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == resourcePlanId && x.AccountDisabled != 1 select x).ToList();
|
||||
List<ManHours_Plan> manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == resourcePlanId select x).ToList();
|
||||
foreach (var item in manHours_Plan)
|
||||
{
|
||||
item.AccountDisabled = 1;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
.f-grid-row.color1,
|
||||
.f-grid-row.color1 .f-icon,
|
||||
.f-grid-row.color1 a {
|
||||
color:lightgray;
|
||||
color: lightgray;
|
||||
}
|
||||
</style>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
|
@ -41,11 +41,11 @@
|
|||
<f:DropDownList ID="drpJobType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drpJobType_SelectedIndexChanged" NextFocusControl="btnFind"></f:DropDownList>
|
||||
<f:DropDownList ID="drpJobStatus" runat="server" EnableCheckBoxSelect="true" EnableMultiSelect="true" NextFocusControl="btnFind" AutoPostBack="true" OnSelectedIndexChanged="drpJobStatus_Click"></f:DropDownList>
|
||||
<f:DropDownList ID="drpDivision" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dropDownList_Click" NextFocusControl="btnFind"></f:DropDownList>
|
||||
<f:TextBox ID="txtJobNoS" runat="server" EmptyText="Enter the Job No." EnableBlurEvent="true" OnBlur="dropDownList_Click" NextFocusControl="btnFind"></f:TextBox>
|
||||
<f:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Hidden="true"></f:Button>
|
||||
|
||||
<f:TextBox ID="txtJobNoS" runat="server" EmptyText="Enter the Job No." EnableBlurEvent="true" OnBlur="dropDownList_Click" NextFocusControl="btnFind"></f:TextBox>
|
||||
<f:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Hidden="true"></f:Button>
|
||||
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:HyperLink runat="server" Text="Projects Transmittals" NavigateUrl="\\wcnnji008219389\Projects_Transmittals" Width="160px" Target="_blank"></f:HyperLink>
|
||||
<f:HyperLink runat="server" Text="Projects Transmittals" NavigateUrl="\\wcnnji008219389\Projects_Transmittals" Width="160px" Target="_blank"></f:HyperLink>
|
||||
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" Text="Search" OnClick="btnSearch_Click"></f:Button>
|
||||
<f:Button ID="btnViewDetail" Icon="User" runat="server" ToolTip="View details" Text="View details" OnClick="btnViewDetail_Click">
|
||||
</f:Button>
|
||||
|
@ -73,40 +73,40 @@
|
|||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="90px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No." HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="Job No." HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_JobType" DataField="ProjectControl_JobType" SortField="ProjectControl_JobType"
|
||||
FieldType="String" HeaderText="Job Type" HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="Job Type" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="ProjectControl_JobTitle" DataField="ProjectControl_JobTitle" SortField="ProjectControl_JobTitle"
|
||||
FieldType="String" HeaderText="Job Title" HeaderTextAlign="Center">
|
||||
FieldType="String" HeaderText="Job Title" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_OrginalBudget" DataField="ProjectControl_OrginalBudget"
|
||||
FieldType="Int" HeaderText="Approved<br/>Budget(RMB)" HeaderTextAlign="Center" RendererFunction="renderSalary">
|
||||
<Editor>
|
||||
<f:NumberBox runat="server" EnableCommas="true" Readonly="true" />
|
||||
</Editor>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_ProjectManager" DataField="ProjectControl_ProjectManager"
|
||||
FieldType="String" HeaderText="Project<br/>Manager" HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="Project<br/>Manager" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_ConstManager" DataField="ProjectControl_ConstManager"
|
||||
FieldType="String" HeaderText="Const.<br/>Manager" HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="Const.<br/>Manager" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_OperationRep" DataField="ProjectControl_OperationRep"
|
||||
FieldType="String" HeaderText="Operation<br/>Rep." HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="Operation<br/>Rep." HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_JobStatus" DataField="ProjectControl_JobStatus"
|
||||
FieldType="String" HeaderText="Job Status" HeaderTextAlign="Center">
|
||||
FieldType="String" HeaderText="Job Status" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="ProjectControl_BUCode" DataField="ProjectControl_BUCode"
|
||||
FieldType="String" HeaderText="Bu.Code" HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="Bu.Code" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PM_MA_ProjectApproval" DataField="PM_MA_ProjectApproval"
|
||||
FieldType="String" Renderer="Date" HeaderText="Approval<br/>Date" HeaderTextAlign="Center" >
|
||||
FieldType="String" Renderer="Date" HeaderText="Approval<br/>Date" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ProjectControl_MS_MC" DataField="ProjectControl_MS_MC"
|
||||
FieldType="String" Renderer="Date" HeaderText="MC Plan<br/>Date" HeaderTextAlign="Center" >
|
||||
FieldType="String" Renderer="Date" HeaderText="MC Plan<br/>Date" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField HeaderText="Schedule" runat="server" HeaderTextAlign="Center" ColumnID="tfSchedule" TextAlign="Center" Width="60px">
|
||||
<ItemTemplate>
|
||||
|
@ -293,7 +293,7 @@
|
|||
<asp:Label ID="lblActualProgress" runat="server" Text='<%# ConvertPro(Eval("ActualProgress")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%-- <f:RenderField Width="90px" ColumnID="SchProgress" DataField="SchProgress"
|
||||
<%-- <f:RenderField Width="90px" ColumnID="SchProgress" DataField="SchProgress"
|
||||
FieldType="String" HeaderText="Sch.Progress" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="ActualProgress" DataField="ActualProgress"
|
||||
|
@ -387,7 +387,7 @@
|
|||
runat="server" BodyPadding="1px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Grid ID="Grid6" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="" DataIDField="" OnRowDataBound="Grid6_RowDataBound"
|
||||
BoxFlex="1" DataKeyNames="" DataIDField="" OnRowDataBound="Grid6_RowDataBound"
|
||||
Height="300px" EnableSummary="true" SummaryPosition="Flow">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" Width="40px" HeaderTextAlign="Center"
|
||||
|
@ -485,7 +485,7 @@
|
|||
<f:Tab Title="TDC" BodyPadding="1px" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="GridTDC" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="TDCId" DataIDField="TDCId" Height="300px" >
|
||||
BoxFlex="1" DataKeyNames="TDCId" DataIDField="TDCId" Height="300px">
|
||||
<Columns>
|
||||
<f:TemplateField Width="50px" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
@ -643,6 +643,45 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Tab>
|
||||
<f:Tab Title="Key Quantity" BodyPadding="1px" runat="server">
|
||||
<Items>
|
||||
<f:Grid ID="GridKeyQuantity" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="KeyQuantityId" DataIDField="KeyQuantityId" Height="300px">
|
||||
<Columns>
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
SortField="DisciplinesWBSCode" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="InputQuantity" DataField="InputQuantity"
|
||||
FieldType="String" HeaderText="Input Quantity" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsUnit" DataField="PlanMHRsUnit"
|
||||
FieldType="String" HeaderText="Plan MHRs/Unit" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="PlanMHRs" DataField="PlanMHRs"
|
||||
FieldType="String" HeaderText="Plan MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanMHRsSummary" DataField="PlanMHRsSummary"
|
||||
FieldType="String" HeaderText="Plan MHRs Summary" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ActualMHRs" DataField="ActualMHRs"
|
||||
FieldType="String" HeaderText="Actual MHRs" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Tab>
|
||||
</Tabs>
|
||||
</f:TabStrip>
|
||||
</Items>
|
||||
|
@ -780,17 +819,17 @@
|
|||
var ManHours = '';
|
||||
var Hours = '';
|
||||
var spanValue1 = 0;
|
||||
var spanValue2= 0;
|
||||
var spanValue2 = 0;
|
||||
for (var i = 0; i < ResourcesArr.length; i++) {
|
||||
if (ResourcesArr[i].DateMonth != "") {
|
||||
Legendata += "'" + ResourcesArr[i].DateMonth + "',";
|
||||
spanValue1 += ResourcesArr[i].ManHours;
|
||||
ManHours += "" + spanValue1 + ",";
|
||||
spanValue2 += ResourcesArr[i].Hours;
|
||||
Hours += "" + spanValue2 + ",";
|
||||
Hours += "" + spanValue2 + ",";
|
||||
}
|
||||
}
|
||||
console.log("ManHours:"+ManHours);
|
||||
console.log("ManHours:" + ManHours);
|
||||
|
||||
Legendata = '[' + Legendata.substring(0, Legendata.length - 1) + ']';
|
||||
Legendata = eval(Legendata);
|
||||
|
@ -823,7 +862,7 @@
|
|||
{
|
||||
type: 'category',
|
||||
data: Legendata,
|
||||
axisLabel: {
|
||||
axisLabel: {
|
||||
interval: 0, //控制坐标轴刻度标签的显示间隔.设置成 0 强制显示所有标签。设置为 1,隔一个标签显示一个标签。设置为2,间隔2个标签。以此类推
|
||||
rotate: -20,//倾斜度 -90 至 90 默认为0
|
||||
textStyle: {
|
||||
|
|
|
@ -226,6 +226,10 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
BindGrid9(eProjectId);//FCR Log
|
||||
}
|
||||
else if (this.TabStrip1.ActiveTabIndex == 11)
|
||||
{
|
||||
BindGridKeyQuantity(eProjectId);//Key Quantity
|
||||
}
|
||||
else
|
||||
{
|
||||
#region General
|
||||
|
@ -335,7 +339,7 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
else
|
||||
{
|
||||
this.txtCivilEng.Text = string.Empty;
|
||||
this.txtCivilEng.Text = string.Empty;
|
||||
}
|
||||
//变更范围
|
||||
if (eProject.PM_SC_ApprovedQty.HasValue)//批准的质量
|
||||
|
@ -995,6 +999,22 @@ namespace FineUIPro.Web.common
|
|||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 加载Key Quantity
|
||||
private void BindGridKeyQuantity(string eProjectId)
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@eprojectId", eProjectId)
|
||||
};
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Proc_KeyQuantityLists", parameter);
|
||||
this.GridKeyQuantity.RecordCount = tb.Rows.Count;
|
||||
//var table = this.GetPagedDataTable(GridKeyQuantity, tb);
|
||||
GridKeyQuantity.DataSource = tb;
|
||||
GridKeyQuantity.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查看编辑器详细信息
|
||||
/// <summary>
|
||||
/// 查看编辑器详细信息
|
||||
|
|
|
@ -1013,6 +1013,15 @@ namespace FineUIPro.Web.common
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid9;
|
||||
|
||||
/// <summary>
|
||||
/// GridKeyQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid GridKeyQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -53,6 +53,9 @@ namespace Model
|
|||
partial void InsertBase_HyperLinkSet(Base_HyperLinkSet instance);
|
||||
partial void UpdateBase_HyperLinkSet(Base_HyperLinkSet instance);
|
||||
partial void DeleteBase_HyperLinkSet(Base_HyperLinkSet instance);
|
||||
partial void InsertBase_QuantityDesctiption(Base_QuantityDesctiption instance);
|
||||
partial void UpdateBase_QuantityDesctiption(Base_QuantityDesctiption instance);
|
||||
partial void DeleteBase_QuantityDesctiption(Base_QuantityDesctiption instance);
|
||||
partial void InsertDesign_Input(Design_Input instance);
|
||||
partial void UpdateDesign_Input(Design_Input instance);
|
||||
partial void DeleteDesign_Input(Design_Input instance);
|
||||
|
@ -80,6 +83,9 @@ namespace Model
|
|||
partial void InsertEditor_FCRLog(Editor_FCRLog instance);
|
||||
partial void UpdateEditor_FCRLog(Editor_FCRLog instance);
|
||||
partial void DeleteEditor_FCRLog(Editor_FCRLog instance);
|
||||
partial void InsertEditor_KeyQuantity(Editor_KeyQuantity instance);
|
||||
partial void UpdateEditor_KeyQuantity(Editor_KeyQuantity instance);
|
||||
partial void DeleteEditor_KeyQuantity(Editor_KeyQuantity instance);
|
||||
partial void InsertEditor_LessonsLearned(Editor_LessonsLearned instance);
|
||||
partial void UpdateEditor_LessonsLearned(Editor_LessonsLearned instance);
|
||||
partial void DeleteEditor_LessonsLearned(Editor_LessonsLearned instance);
|
||||
|
@ -260,6 +266,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Base_QuantityDesctiption> Base_QuantityDesctiption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<Base_QuantityDesctiption>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Design_Input> Design_Input
|
||||
{
|
||||
get
|
||||
|
@ -332,6 +346,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Editor_KeyQuantity> Editor_KeyQuantity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<Editor_KeyQuantity>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Editor_LessonsLearned> Editor_LessonsLearned
|
||||
{
|
||||
get
|
||||
|
@ -1825,6 +1847,8 @@ namespace Model
|
|||
|
||||
private string _DepartLeader;
|
||||
|
||||
private EntitySet<Base_QuantityDesctiption> _Base_QuantityDesctiption;
|
||||
|
||||
private EntitySet<Sys_User> _Sys_User;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
|
@ -1847,6 +1871,7 @@ namespace Model
|
|||
|
||||
public Base_Depart()
|
||||
{
|
||||
this._Base_QuantityDesctiption = new EntitySet<Base_QuantityDesctiption>(new Action<Base_QuantityDesctiption>(this.attach_Base_QuantityDesctiption), new Action<Base_QuantityDesctiption>(this.detach_Base_QuantityDesctiption));
|
||||
this._Sys_User = new EntitySet<Sys_User>(new Action<Sys_User>(this.attach_Sys_User), new Action<Sys_User>(this.detach_Sys_User));
|
||||
OnCreated();
|
||||
}
|
||||
|
@ -1871,7 +1896,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartCode", DbType="NVarChar(10)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartCode", DbType="NVarChar(20)")]
|
||||
public string DepartCode
|
||||
{
|
||||
get
|
||||
|
@ -1971,6 +1996,19 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_QuantityDesctiption_Base_Depart", Storage="_Base_QuantityDesctiption", ThisKey="DepartId", OtherKey="DepartId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Base_QuantityDesctiption> Base_QuantityDesctiption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Base_QuantityDesctiption;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Base_QuantityDesctiption.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_User_Base_Depart", Storage="_Sys_User", ThisKey="DepartId", OtherKey="DepartId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Sys_User> Sys_User
|
||||
{
|
||||
|
@ -2004,6 +2042,18 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
private void attach_Base_QuantityDesctiption(Base_QuantityDesctiption entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_Depart = this;
|
||||
}
|
||||
|
||||
private void detach_Base_QuantityDesctiption(Base_QuantityDesctiption entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_Depart = null;
|
||||
}
|
||||
|
||||
private void attach_Sys_User(Sys_User entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
|
@ -2055,6 +2105,8 @@ namespace Model
|
|||
|
||||
private string _NetworkOper1;
|
||||
|
||||
private EntitySet<Base_QuantityDesctiption> _Base_QuantityDesctiption;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
@ -2095,6 +2147,7 @@ namespace Model
|
|||
|
||||
public Base_DisciplinesWBS()
|
||||
{
|
||||
this._Base_QuantityDesctiption = new EntitySet<Base_QuantityDesctiption>(new Action<Base_QuantityDesctiption>(this.attach_Base_QuantityDesctiption), new Action<Base_QuantityDesctiption>(this.detach_Base_QuantityDesctiption));
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
|
@ -2418,6 +2471,19 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_QuantityDesctiption_Base_DisciplinesWBS", Storage="_Base_QuantityDesctiption", ThisKey="DisciplinesWBSId", OtherKey="DisciplinesWBSId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Base_QuantityDesctiption> Base_QuantityDesctiption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Base_QuantityDesctiption;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Base_QuantityDesctiption.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
@ -2437,6 +2503,18 @@ namespace Model
|
|||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
private void attach_Base_QuantityDesctiption(Base_QuantityDesctiption entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_DisciplinesWBS = this;
|
||||
}
|
||||
|
||||
private void detach_Base_QuantityDesctiption(Base_QuantityDesctiption entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_DisciplinesWBS = null;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_HyperLinkSet")]
|
||||
|
@ -2573,6 +2651,274 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_QuantityDesctiption")]
|
||||
public partial class Base_QuantityDesctiption : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
|
||||
|
||||
private string _KeyId;
|
||||
|
||||
private string _DepartId;
|
||||
|
||||
private string _DisciplinesWBSId;
|
||||
|
||||
private string _QuantityDesctiption;
|
||||
|
||||
private System.Nullable<decimal> _PlanMHRsUnit;
|
||||
|
||||
private EntityRef<Base_Depart> _Base_Depart;
|
||||
|
||||
private EntityRef<Base_DisciplinesWBS> _Base_DisciplinesWBS;
|
||||
|
||||
private EntitySet<Editor_KeyQuantity> _Editor_KeyQuantity;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
partial void OnCreated();
|
||||
partial void OnKeyIdChanging(string value);
|
||||
partial void OnKeyIdChanged();
|
||||
partial void OnDepartIdChanging(string value);
|
||||
partial void OnDepartIdChanged();
|
||||
partial void OnDisciplinesWBSIdChanging(string value);
|
||||
partial void OnDisciplinesWBSIdChanged();
|
||||
partial void OnQuantityDesctiptionChanging(string value);
|
||||
partial void OnQuantityDesctiptionChanged();
|
||||
partial void OnPlanMHRsUnitChanging(System.Nullable<decimal> value);
|
||||
partial void OnPlanMHRsUnitChanged();
|
||||
#endregion
|
||||
|
||||
public Base_QuantityDesctiption()
|
||||
{
|
||||
this._Base_Depart = default(EntityRef<Base_Depart>);
|
||||
this._Base_DisciplinesWBS = default(EntityRef<Base_DisciplinesWBS>);
|
||||
this._Editor_KeyQuantity = new EntitySet<Editor_KeyQuantity>(new Action<Editor_KeyQuantity>(this.attach_Editor_KeyQuantity), new Action<Editor_KeyQuantity>(this.detach_Editor_KeyQuantity));
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string KeyId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._KeyId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._KeyId != value))
|
||||
{
|
||||
this.OnKeyIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._KeyId = value;
|
||||
this.SendPropertyChanged("KeyId");
|
||||
this.OnKeyIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartId", DbType="NVarChar(50)")]
|
||||
public string DepartId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DepartId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DepartId != value))
|
||||
{
|
||||
if (this._Base_Depart.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnDepartIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._DepartId = value;
|
||||
this.SendPropertyChanged("DepartId");
|
||||
this.OnDepartIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisciplinesWBSId", DbType="NVarChar(50)")]
|
||||
public string DisciplinesWBSId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DisciplinesWBSId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DisciplinesWBSId != value))
|
||||
{
|
||||
if (this._Base_DisciplinesWBS.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnDisciplinesWBSIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._DisciplinesWBSId = value;
|
||||
this.SendPropertyChanged("DisciplinesWBSId");
|
||||
this.OnDisciplinesWBSIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantityDesctiption", DbType="NVarChar(200)")]
|
||||
public string QuantityDesctiption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._QuantityDesctiption;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._QuantityDesctiption != value))
|
||||
{
|
||||
this.OnQuantityDesctiptionChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._QuantityDesctiption = value;
|
||||
this.SendPropertyChanged("QuantityDesctiption");
|
||||
this.OnQuantityDesctiptionChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanMHRsUnit", DbType="Decimal(18,2)")]
|
||||
public System.Nullable<decimal> PlanMHRsUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanMHRsUnit;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanMHRsUnit != value))
|
||||
{
|
||||
this.OnPlanMHRsUnitChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanMHRsUnit = value;
|
||||
this.SendPropertyChanged("PlanMHRsUnit");
|
||||
this.OnPlanMHRsUnitChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_QuantityDesctiption_Base_Depart", Storage="_Base_Depart", ThisKey="DepartId", OtherKey="DepartId", IsForeignKey=true)]
|
||||
public Base_Depart Base_Depart
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Base_Depart.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
Base_Depart previousValue = this._Base_Depart.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._Base_Depart.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._Base_Depart.Entity = null;
|
||||
previousValue.Base_QuantityDesctiption.Remove(this);
|
||||
}
|
||||
this._Base_Depart.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.Base_QuantityDesctiption.Add(this);
|
||||
this._DepartId = value.DepartId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._DepartId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("Base_Depart");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_QuantityDesctiption_Base_DisciplinesWBS", Storage="_Base_DisciplinesWBS", ThisKey="DisciplinesWBSId", OtherKey="DisciplinesWBSId", IsForeignKey=true)]
|
||||
public Base_DisciplinesWBS Base_DisciplinesWBS
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Base_DisciplinesWBS.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
Base_DisciplinesWBS previousValue = this._Base_DisciplinesWBS.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._Base_DisciplinesWBS.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._Base_DisciplinesWBS.Entity = null;
|
||||
previousValue.Base_QuantityDesctiption.Remove(this);
|
||||
}
|
||||
this._Base_DisciplinesWBS.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.Base_QuantityDesctiption.Add(this);
|
||||
this._DisciplinesWBSId = value.DisciplinesWBSId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._DisciplinesWBSId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("Base_DisciplinesWBS");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Editor_KeyQuantity_Base_QuantityDesctiption", Storage="_Editor_KeyQuantity", ThisKey="KeyId", OtherKey="KeyId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Editor_KeyQuantity> Editor_KeyQuantity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Editor_KeyQuantity;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Editor_KeyQuantity.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void SendPropertyChanging()
|
||||
{
|
||||
if ((this.PropertyChanging != null))
|
||||
{
|
||||
this.PropertyChanging(this, emptyChangingEventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void SendPropertyChanged(String propertyName)
|
||||
{
|
||||
if ((this.PropertyChanged != null))
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
private void attach_Editor_KeyQuantity(Editor_KeyQuantity entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_QuantityDesctiption = this;
|
||||
}
|
||||
|
||||
private void detach_Editor_KeyQuantity(Editor_KeyQuantity entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_QuantityDesctiption = null;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Design_Input")]
|
||||
public partial class Design_Input : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
@ -5690,6 +6036,8 @@ namespace Model
|
|||
|
||||
private EntitySet<Editor_FCRLog> _Editor_FCRLog;
|
||||
|
||||
private EntitySet<Editor_KeyQuantity> _Editor_KeyQuantity;
|
||||
|
||||
private EntitySet<Editor_LessonsLearned> _Editor_LessonsLearned;
|
||||
|
||||
private EntitySet<Editor_Punch> _Editor_Punch;
|
||||
|
@ -6122,6 +6470,7 @@ namespace Model
|
|||
this._Editor_CostReport = new EntitySet<Editor_CostReport>(new Action<Editor_CostReport>(this.attach_Editor_CostReport), new Action<Editor_CostReport>(this.detach_Editor_CostReport));
|
||||
this._Editor_PM = new EntitySet<Editor_PM>(new Action<Editor_PM>(this.attach_Editor_PM), new Action<Editor_PM>(this.detach_Editor_PM));
|
||||
this._Editor_FCRLog = new EntitySet<Editor_FCRLog>(new Action<Editor_FCRLog>(this.attach_Editor_FCRLog), new Action<Editor_FCRLog>(this.detach_Editor_FCRLog));
|
||||
this._Editor_KeyQuantity = new EntitySet<Editor_KeyQuantity>(new Action<Editor_KeyQuantity>(this.attach_Editor_KeyQuantity), new Action<Editor_KeyQuantity>(this.detach_Editor_KeyQuantity));
|
||||
this._Editor_LessonsLearned = new EntitySet<Editor_LessonsLearned>(new Action<Editor_LessonsLearned>(this.attach_Editor_LessonsLearned), new Action<Editor_LessonsLearned>(this.detach_Editor_LessonsLearned));
|
||||
this._Editor_Punch = new EntitySet<Editor_Punch>(new Action<Editor_Punch>(this.attach_Editor_Punch), new Action<Editor_Punch>(this.detach_Editor_Punch));
|
||||
this._ManHours_Plan = new EntitySet<ManHours_Plan>(new Action<ManHours_Plan>(this.attach_ManHours_Plan), new Action<ManHours_Plan>(this.detach_ManHours_Plan));
|
||||
|
@ -6811,7 +7160,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CM_Remarks_Construction", DbType="NVarChar(2000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CM_Remarks_Construction", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string CM_Remarks_Construction
|
||||
{
|
||||
get
|
||||
|
@ -6831,7 +7180,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CM_Remarks_Procurement", DbType="NVarChar(2000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CM_Remarks_Procurement", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string CM_Remarks_Procurement
|
||||
{
|
||||
get
|
||||
|
@ -6851,7 +7200,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CM_Remarks_QualityHSE", DbType="NVarChar(2000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CM_Remarks_QualityHSE", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string CM_Remarks_QualityHSE
|
||||
{
|
||||
get
|
||||
|
@ -10269,6 +10618,19 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Editor_KeyQuantity_Editor_EProject", Storage="_Editor_KeyQuantity", ThisKey="EProjectId", OtherKey="EProjectId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Editor_KeyQuantity> Editor_KeyQuantity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Editor_KeyQuantity;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Editor_KeyQuantity.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Editor_LessonsLearned_Editor_EProject", Storage="_Editor_LessonsLearned", ThisKey="EProjectId", OtherKey="EProjectId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Editor_LessonsLearned> Editor_LessonsLearned
|
||||
{
|
||||
|
@ -10439,6 +10801,18 @@ namespace Model
|
|||
entity.Editor_EProject = null;
|
||||
}
|
||||
|
||||
private void attach_Editor_KeyQuantity(Editor_KeyQuantity entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Editor_EProject = this;
|
||||
}
|
||||
|
||||
private void detach_Editor_KeyQuantity(Editor_KeyQuantity entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Editor_EProject = null;
|
||||
}
|
||||
|
||||
private void attach_Editor_LessonsLearned(Editor_LessonsLearned entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
|
@ -11194,6 +11568,246 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Editor_KeyQuantity")]
|
||||
public partial class Editor_KeyQuantity : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
|
||||
|
||||
private string _KeyQuantityId;
|
||||
|
||||
private string _EProjectId;
|
||||
|
||||
private string _KeyId;
|
||||
|
||||
private System.Nullable<decimal> _InputQuantity;
|
||||
|
||||
private System.Nullable<decimal> _PlanMHRs;
|
||||
|
||||
private EntityRef<Base_QuantityDesctiption> _Base_QuantityDesctiption;
|
||||
|
||||
private EntityRef<Editor_EProject> _Editor_EProject;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
partial void OnCreated();
|
||||
partial void OnKeyQuantityIdChanging(string value);
|
||||
partial void OnKeyQuantityIdChanged();
|
||||
partial void OnEProjectIdChanging(string value);
|
||||
partial void OnEProjectIdChanged();
|
||||
partial void OnKeyIdChanging(string value);
|
||||
partial void OnKeyIdChanged();
|
||||
partial void OnInputQuantityChanging(System.Nullable<decimal> value);
|
||||
partial void OnInputQuantityChanged();
|
||||
partial void OnPlanMHRsChanging(System.Nullable<decimal> value);
|
||||
partial void OnPlanMHRsChanged();
|
||||
#endregion
|
||||
|
||||
public Editor_KeyQuantity()
|
||||
{
|
||||
this._Base_QuantityDesctiption = default(EntityRef<Base_QuantityDesctiption>);
|
||||
this._Editor_EProject = default(EntityRef<Editor_EProject>);
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyQuantityId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string KeyQuantityId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._KeyQuantityId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._KeyQuantityId != value))
|
||||
{
|
||||
this.OnKeyQuantityIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._KeyQuantityId = value;
|
||||
this.SendPropertyChanged("KeyQuantityId");
|
||||
this.OnKeyQuantityIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EProjectId", DbType="NVarChar(50)")]
|
||||
public string EProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._EProjectId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._EProjectId != value))
|
||||
{
|
||||
if (this._Editor_EProject.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnEProjectIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._EProjectId = value;
|
||||
this.SendPropertyChanged("EProjectId");
|
||||
this.OnEProjectIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyId", DbType="NVarChar(50)")]
|
||||
public string KeyId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._KeyId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._KeyId != value))
|
||||
{
|
||||
if (this._Base_QuantityDesctiption.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnKeyIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._KeyId = value;
|
||||
this.SendPropertyChanged("KeyId");
|
||||
this.OnKeyIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InputQuantity", DbType="Decimal(18,2)")]
|
||||
public System.Nullable<decimal> InputQuantity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._InputQuantity;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._InputQuantity != value))
|
||||
{
|
||||
this.OnInputQuantityChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._InputQuantity = value;
|
||||
this.SendPropertyChanged("InputQuantity");
|
||||
this.OnInputQuantityChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanMHRs", DbType="Decimal(18,2)")]
|
||||
public System.Nullable<decimal> PlanMHRs
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanMHRs;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanMHRs != value))
|
||||
{
|
||||
this.OnPlanMHRsChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanMHRs = value;
|
||||
this.SendPropertyChanged("PlanMHRs");
|
||||
this.OnPlanMHRsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Editor_KeyQuantity_Base_QuantityDesctiption", Storage="_Base_QuantityDesctiption", ThisKey="KeyId", OtherKey="KeyId", IsForeignKey=true)]
|
||||
public Base_QuantityDesctiption Base_QuantityDesctiption
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Base_QuantityDesctiption.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
Base_QuantityDesctiption previousValue = this._Base_QuantityDesctiption.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._Base_QuantityDesctiption.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._Base_QuantityDesctiption.Entity = null;
|
||||
previousValue.Editor_KeyQuantity.Remove(this);
|
||||
}
|
||||
this._Base_QuantityDesctiption.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.Editor_KeyQuantity.Add(this);
|
||||
this._KeyId = value.KeyId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._KeyId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("Base_QuantityDesctiption");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Editor_KeyQuantity_Editor_EProject", Storage="_Editor_EProject", ThisKey="EProjectId", OtherKey="EProjectId", IsForeignKey=true)]
|
||||
public Editor_EProject Editor_EProject
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Editor_EProject.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
Editor_EProject previousValue = this._Editor_EProject.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._Editor_EProject.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._Editor_EProject.Entity = null;
|
||||
previousValue.Editor_KeyQuantity.Remove(this);
|
||||
}
|
||||
this._Editor_EProject.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.Editor_KeyQuantity.Add(this);
|
||||
this._EProjectId = value.EProjectId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._EProjectId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("Editor_EProject");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void SendPropertyChanging()
|
||||
{
|
||||
if ((this.PropertyChanging != null))
|
||||
{
|
||||
this.PropertyChanging(this, emptyChangingEventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void SendPropertyChanged(String propertyName)
|
||||
{
|
||||
if ((this.PropertyChanged != null))
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Editor_LessonsLearned")]
|
||||
public partial class Editor_LessonsLearned : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
@ -35938,7 +36552,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartCode", DbType="NVarChar(10)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartCode", DbType="NVarChar(20)")]
|
||||
public string DepartCode
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Reference in New Issue