1
This commit is contained in:
@@ -102,6 +102,37 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊材入库
|
||||
/// </summary>
|
||||
/// <param name="stockIn"></param>
|
||||
public static void UpdateStockIn2(Model.Weld_StockIn stockIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockIn.StockInId);
|
||||
if (newStockIn != null)
|
||||
{
|
||||
newStockIn.WeldId = stockIn.WeldId;
|
||||
newStockIn.Amount = stockIn.Amount;
|
||||
newStockIn.Weight = stockIn.Weight;
|
||||
//newStockIn.RecycleAmount = stockIn.RecycleAmount;
|
||||
//newStockIn.RecycleWeight = stockIn.RecycleWeight;
|
||||
//newStockIn.Materialman = stockIn.Materialman;
|
||||
//newStockIn.InStockDate = stockIn.InStockDate;
|
||||
newStockIn.IsReview = stockIn.IsReview;
|
||||
//newStockIn.ReviewMan = stockIn.ReviewMan;
|
||||
newStockIn.ReviewDate = stockIn.ReviewDate;
|
||||
//newStockIn.ReviewResult = stockIn.ReviewResult;
|
||||
newStockIn.AttachUrl = stockIn.AttachUrl;
|
||||
//newStockIn.UsingAmount = stockIn.UsingAmount;
|
||||
newStockIn.Warrantybook = stockIn.Warrantybook;
|
||||
newStockIn.HeartNo = stockIn.HeartNo;
|
||||
newStockIn.SupplierId = stockIn.SupplierId;
|
||||
newStockIn.UnitStoreId = stockIn.UnitStoreId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新附件
|
||||
/// </summary>
|
||||
|
||||
@@ -1 +1,86 @@
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
|
||||
在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
|
||||
在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
|
||||
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
|
||||
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
|
||||
在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
|
||||
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
|
||||
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
|
||||
在 System.Data.SqlClient.SqlConnection.Open()
|
||||
在 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
|
||||
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
|
||||
在 BLL.Sys_UserService.UserLogOn(String account, String password, Boolean rememberMe, Page page) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\BLL\Common\SysManage\Sys_UserService.cs:行号 39
|
||||
在 FineUIPro.Web.Login.btnLogin_Click(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\Login.aspx.cs:行号 52
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/12/2025 16:45:20
|
||||
出错文件:http://localhost:64304/Login.aspx
|
||||
IP地址:::1
|
||||
|
||||
出错时间:05/12/2025 16:45:20
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:无法找到列 ProjectCode。
|
||||
错误堆栈:
|
||||
在 System.Data.DataTable.ParseSortString(String sortString)
|
||||
在 System.Data.DataView.CheckSort(String sort)
|
||||
在 System.Data.DataView.set_Sort(String value)
|
||||
在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 328
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BindGrid2() 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 354
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BtnAnalyse2_Click(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 414
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/16/2025 15:00:34
|
||||
出错文件:http://localhost:64304/HJGL/WeldingReport/WelderPerformance.aspx
|
||||
IP地址:::1
|
||||
操作人员:管理员
|
||||
|
||||
出错时间:05/16/2025 15:00:34
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:无法找到列 ProjectCode。
|
||||
错误堆栈:
|
||||
在 System.Data.DataTable.ParseSortString(String sortString)
|
||||
在 System.Data.DataView.CheckSort(String sort)
|
||||
在 System.Data.DataView.set_Sort(String value)
|
||||
在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 328
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BindGrid2() 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 354
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BtnAnalyse2_Click(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 414
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/16/2025 15:00:37
|
||||
出错文件:http://localhost:64304/HJGL/WeldingReport/WelderPerformance.aspx
|
||||
IP地址:::1
|
||||
操作人员:管理员
|
||||
|
||||
出错时间:05/16/2025 15:00:37
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="BtnAnalyse2" Text="按焊工统计" Icon="ChartPie" runat="server" Hidden="true" OnClick="BtnAnalyse2_Click"></f:Button>
|
||||
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
|
||||
<f:Button ID="BtnAnalyse2" Text="按焊工统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse2_Click"></f:Button>
|
||||
<f:Button ID="BtnAnalyse" Text="按项目统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
|
||||
@@ -398,6 +398,7 @@
|
||||
/// <param name="e"></param>
|
||||
protected void BtnAnalyse_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.Columns[1].Hidden = false;
|
||||
BindGrid();
|
||||
OutputSummaryData();
|
||||
}
|
||||
@@ -409,8 +410,10 @@
|
||||
/// <param name="e"></param>
|
||||
protected void BtnAnalyse2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.Columns[1].Hidden = true;
|
||||
BindGrid2();
|
||||
OutputSummaryData();
|
||||
this.Grid1.SummaryData = null;
|
||||
//OutputSummaryData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
||||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<add key="ConnectionString" value="Server=.\SQL2019;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="诺必达焊接管理系统"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑焊材入库录入</title>
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -49,10 +55,16 @@
|
||||
<Items>
|
||||
<f:NumberBox ID="txtWeight" runat="server" Label="重量(公斤)" LabelAlign="Right" NoNegative="true" AutoPostBack="true" OnTextChanged="txtWeight_TextChanged">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtAmount" runat="server" Label="数量(根)" LabelAlign="Right" NoNegative="true">
|
||||
<f:NumberBox ID="txtAmount" runat="server" Label="数量(根)" LabelAlign="Right" NoNegative="true" AutoPostBack="true" OnTextChanged="txtAmount_TextChanged">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Hidden="true" runat="server" ID="trRemainingAmount">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbRemainingAmount" Text="库存重量(公斤):" CssClass="customlabel"></f:Label>
|
||||
<f:Label runat="server" ID="lbReAmount" Label="库存数量(根)" CssClass="customlabel" LabelAlign="Right"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitStore" runat="server" Label="单位仓库" LabelAlign="Right" EnableGroup="true" Required="true" ShowRedStar="true">
|
||||
|
||||
@@ -116,6 +116,20 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
{
|
||||
this.drpUnitStore.SelectedValue = stockIn.UnitStoreId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["RemainingAmount"]))
|
||||
{
|
||||
this.trRemainingAmount.Hidden = false;
|
||||
decimal remainingAmount = (stockIn.Amount ?? 0) - (stockIn.UsingAmount ?? 0);
|
||||
this.lbReAmount.Text = remainingAmount.ToString("0.####");
|
||||
if (weld.ConvertValue > 0)
|
||||
{
|
||||
this.lbRemainingAmount.Text = "库存重量(公斤):" + (remainingAmount * weld.ConvertValue.Value).ToString("0.####");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbRemainingAmount.Text = stockIn.Weight.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,8 +205,15 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
var mat = from x in Funs.DB.Weld_UsingMat where x.StockInId == this.StockInId select x;
|
||||
if (mat.Count() > 0)
|
||||
{
|
||||
// 焊材已有领用,不更新数量
|
||||
BLL.StockInService.UpdateStockIn1(stockIn);
|
||||
if (!string.IsNullOrEmpty(Request.Params["RemainingAmount"]))
|
||||
{
|
||||
BLL.StockInService.UpdateStockIn2(stockIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 焊材已有领用,不更新数量
|
||||
BLL.StockInService.UpdateStockIn1(stockIn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -317,6 +338,37 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtAmount_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trRemainingAmount.Hidden == false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdWeldId.Text.Trim()))
|
||||
{
|
||||
var weld = BLL.WeldInfoService.GetWeldInfoById(this.hdWeldId.Text.Trim());
|
||||
if (weld != null)
|
||||
{
|
||||
Model.Weld_StockIn stockIn = BLL.StockInService.GetStockInById(this.StockInId);
|
||||
decimal remainingAmount = Funs.GetNewDecimalOrZero(this.txtAmount.Text.Trim()) - (stockIn.UsingAmount ?? 0);
|
||||
if (weld.ConvertValue > 0)
|
||||
{
|
||||
this.lbRemainingAmount.Text = "库存重量(公斤):" + (remainingAmount * weld.ConvertValue.Value).ToString("0.####");
|
||||
}
|
||||
this.lbReAmount.Text = remainingAmount.ToString("0.####");
|
||||
//if (weld.ConvertValue.HasValue)
|
||||
//{
|
||||
// decimal? amountCov = Funs.GetNewDecimal(this.txtWeight.Text.Trim()) / weld.ConvertValue;
|
||||
// int amount = Convert.ToInt32(Math.Floor(amountCov.Value));
|
||||
// this.txtAmount.Text = amount.ToString();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.txtAmount.Text = this.txtWeight.Text.Trim();
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//protected void rblIsReview_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -129,6 +129,33 @@ namespace FineUIPro.Web.WeldMat.Stock {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAmount;
|
||||
|
||||
/// <summary>
|
||||
/// trRemainingAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow trRemainingAmount;
|
||||
|
||||
/// <summary>
|
||||
/// lbRemainingAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbRemainingAmount;
|
||||
|
||||
/// <summary>
|
||||
/// lbReAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbReAmount;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitStore 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -71,13 +71,13 @@
|
||||
HeaderText="剩余数量(Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="ReAmount" DataField="ReAmount" FieldType="Double"
|
||||
HeaderText="剩余数量(根/Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
HeaderText="剩余数量(根)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="RecycleAmount" DataField="RecycleAmount" FieldType="Double"
|
||||
HeaderText="回收数量(Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="RecAmount" DataField="RecAmount" FieldType="Double"
|
||||
HeaderText="回收数量(根/Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
HeaderText="回收数量(根)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="UnitStoreName" DataField="UnitStoreName" FieldType="String"
|
||||
HeaderText="单位仓库" HeaderTextAlign="Center" TextAlign="Center" ExpandUnusedSpace="true">
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @" SELECT v.WeldId+v.UnitStoreId as WeldId, weld.WeldCode, weld.WeldName,weld.WeldSpec,wType.WeldTypeName,'Kg' as WeldUnit,(unit.UnitName+'('+store.UnitStoreName+')') AS UnitStoreName,
|
||||
string strSql = @" SELECT v.WeldId+','+v.UnitStoreId as WeldId, weld.WeldCode, weld.WeldName,weld.WeldSpec,wType.WeldTypeName,'Kg' as WeldUnit,(unit.UnitName+'('+store.UnitStoreName+')') AS UnitStoreName,
|
||||
v.RemainingAmount as ReAmount,
|
||||
(CASE WHEN weld.ConvertValue>0
|
||||
THEN v.RemainingAmount*weld.ConvertValue
|
||||
@@ -172,7 +172,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
string id = Grid1.SelectedRowID.Split(',')[0];
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StockSelectDetail.aspx?WeldId={0}", id, "编辑 - ")));
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="库存明细" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="StockInId" AllowCellEditing="true" ClicksToEdit="2"
|
||||
DataIDField="StockInId" AllowSorting="true" SortField="WeldCode" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
@@ -75,8 +75,10 @@
|
||||
<f:RenderField Width="90px" ColumnID="InStockDate" DataField="InStockDate" FieldType="Date"
|
||||
Renderer="Date" HeaderText="入库时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
@@ -92,6 +94,27 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="编辑焊材入库录入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="350px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="修正库存" Icon="Pencil">
|
||||
</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>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
public partial class StockSelectDetail : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 焊材ID
|
||||
/// </summary>
|
||||
@@ -81,12 +81,12 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
listStr.Add(new SqlParameter("@WeldId", this.WeldId));
|
||||
}
|
||||
|
||||
if (drpUnit.SelectedValue!=Const._Null && drpUnit.SelectedValue != null)
|
||||
if (drpUnit.SelectedValue != Const._Null && drpUnit.SelectedValue != null)
|
||||
{
|
||||
strSql += " AND unit.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
||||
}
|
||||
if (drpUnitStore.SelectedValue != Const._Null && drpUnitStore.SelectedValue!=null)
|
||||
if (drpUnitStore.SelectedValue != Const._Null && drpUnitStore.SelectedValue != null)
|
||||
{
|
||||
strSql += " AND StockIn.UnitStoreId = @UnitStoreId";
|
||||
listStr.Add(new SqlParameter("@UnitStoreId", drpUnitStore.SelectedValue));
|
||||
@@ -96,7 +96,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
strSql += " AND WeldInfo.WeldName LIKE @WeldName";
|
||||
listStr.Add(new SqlParameter("@WeldName", "%" + this.txtWeldName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -175,5 +175,62 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 弹出编辑窗口关闭事件
|
||||
/// <summary>
|
||||
/// 弹出编辑窗体关闭事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 双击Grid事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <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("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
var q = BLL.StockInService.GetStockInById(id);
|
||||
if (q.UnitStoreId != null)
|
||||
{
|
||||
var s = BLL.UnitStoreService.GetUnitStoreById(q.UnitStoreId);
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StockInEdit.aspx?StockInId={0}&RemainingAmount=RemainingAmount", id, "编辑 - ")));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -146,5 +146,32 @@ namespace FineUIPro.Web.WeldMat.Stock {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user