Continuo creazione pagina offline orders
This commit is contained in:
@@ -1,9 +1,40 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_offlineOrders.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_offlineOrders" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagPrefix="uc1" TagName="mod_righePag" %>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header text-center bg-success">
|
||||
<h4>Offline Orders</h4>
|
||||
</div>
|
||||
<div class="card-body">Content</div>
|
||||
<div class="card-footer">Footer</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="OrdID" DataSourceID="ods" CssClass="table table-sm table-condensed table-striped" AllowSorting="True">
|
||||
<SelectedRowStyle CssClass="table-info" />
|
||||
<EmptyDataTemplate>
|
||||
No Data Available
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" CausesValidation="False" ToolTip="Reset" CssClass="btn btn-sm btn-primary" OnClick="lbtReset_Click"><i class="fa fa-refresh" aria-hidden="true"></i></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Select" CssClass="btn btn-sm btn-primary"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="OrdID" HeaderText="OrdID" InsertVisible="False" ReadOnly="True" SortExpression="OrdID" />
|
||||
<asp:BoundField DataField="CreationDate" HeaderText="Created" SortExpression="CreationDate" />
|
||||
<%--<asp:BoundField DataField="OrdStatus" HeaderText="OrdStatus" SortExpression="OrdStatus" />--%>
|
||||
<asp:BoundField DataField="StatusDesc" HeaderText="Status" ReadOnly="True" SortExpression="StatusDesc" />
|
||||
<asp:BoundField DataField="NumItems" HeaderText="# Items" SortExpression="NumItems" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getBySearch" TypeName="AppData.DS_AppTableAdapters.OfflineOrderListTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="2" Name="MaxOrdStatus" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<uc1:mod_righePag runat="server" ID="mod_righePag" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
@@ -11,7 +7,25 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = 10;
|
||||
}
|
||||
mod_righePag.eh_newNum += Mod_righePag_eh_newNum;
|
||||
}
|
||||
|
||||
private void Mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
protected void lbtReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,5 +11,32 @@ namespace NKC_WF.WebUserControls {
|
||||
|
||||
|
||||
public partial class cmp_offlineOrders {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_righePag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.mod_righePag mod_righePag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<h4>Scrap List (Items to process)</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" AllowPaging="True" CssClass="table table-sm table-condensed table-striped">
|
||||
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" AllowPaging="True" CssClass="table table-sm table-condensed table-striped" AllowSorting="true">
|
||||
<Columns>
|
||||
<%--<asp:BoundField DataField="ItemID" HeaderText="ItemID" InsertVisible="False" ReadOnly="True" SortExpression="ItemID" />
|
||||
<asp:BoundField DataField="StatusID" HeaderText="StatusID" SortExpression="StatusID" />
|
||||
@@ -22,7 +22,7 @@
|
||||
<asp:HiddenField runat="server" ID="hfItemID" Value='<%# Eval("ItemID") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="MatID" SortExpression="MatID">
|
||||
<asp:TemplateField HeaderText="Mat" SortExpression="MatID">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="lblMatId" Text='<%# matByKey(Eval("MatID")) %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
|
||||
</ItemTemplate>
|
||||
@@ -53,7 +53,7 @@
|
||||
</asp:ObjectDataSource>
|
||||
<%--<asp:DropDownList runat="server" ID="ddlMat" DataSourceID="odsMat" DataTextField="MatDesc" DataValueField="MatID"></asp:DropDownList>--%>
|
||||
<%--<asp:ObjectDataSource runat="server" ID="odsMat" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="AppData.DS_AppTableAdapters.MaterialsTableAdapter"></asp:ObjectDataSource>--%>
|
||||
<asp:LinkButton runat="server" ID="lbtCreateOffOrd" CssClass="btn btn-outline-success btn-block" OnClick="lbtCreateOffOrd_Click">Create Order <i class="fa fa-arrow-circle-right" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtCreateOffOrd" CssClass="btn btn-outline-success btn-block" OnClick="lbtCreateOffOrd_Click" OnClientClick='return confirm("Confirm create order fo selected items?")'>Create Order <i class="fa fa-arrow-circle-right" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_scrapList : System.Web.UI.UserControl
|
||||
public partial class cmp_scrapList : BaseUserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -92,6 +92,7 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
protected void lbtCreateOffOrd_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool doReport = false;
|
||||
// creo NUOVO ordine offline...
|
||||
DS_App.OfflineOrderListDataTable tabOrdini = DataLayer.man.taOffOL.insertNew();
|
||||
int itemId = 0;
|
||||
@@ -114,12 +115,18 @@ namespace NKC_WF.WebUserControls
|
||||
if (itemId > 0)
|
||||
{
|
||||
DataLayer.man.taOO2I.insertQuery(tabOrdini[0].OrdID, itemId);
|
||||
doReport = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
if (doReport)
|
||||
{
|
||||
grView.DataBind();
|
||||
raiseEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user