115 lines
3.4 KiB
C#
115 lines
3.4 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
using GZTW.AyaNova.BLL;
|
|
|
|
public partial class PartInventoryView : BaseThemePage
|
|
{
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
Util.Localize(this.Page);
|
|
|
|
Page.Title = Util.LocaleText("PartByWarehouseInventory.Label.List");
|
|
|
|
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
|
PartInventoryList list = PartInventoryList.GetListForSingleItem(new Guid(Request.QueryString["id"]));
|
|
|
|
|
|
|
|
string partassembly = Util.LocaleText("O.PartAssembly");
|
|
string partcategory=Util.LocaleText("O.PartCategory");
|
|
string partserials = Util.LocaleText("Common.Label.SerialNumber");
|
|
string partwarehouse = Util.LocaleText("O.PartWarehouse");
|
|
string part=Util.LocaleText("O.Part");
|
|
string onhand = Util.LocaleText("PartByWarehouseInventory.Label.QuantityOnHand");
|
|
string onorder = Util.LocaleText("PartByWarehouseInventory.Label.QuantityOnOrder");
|
|
|
|
|
|
sb.Append("<h1>" + Page.Title + "</h1>");
|
|
|
|
if (list.Count > 0)
|
|
{
|
|
foreach (PartInventoryList.PartInventoryListInfo i in list)
|
|
{
|
|
sb.Append("<b>");
|
|
sb.Append(i.LT_O_Part);
|
|
sb.Append("</b>");
|
|
|
|
sb.Append("<ul>");
|
|
|
|
sb.Append("<li>");
|
|
sb.Append(partwarehouse);
|
|
sb.Append(": ");
|
|
sb.Append(i.LT_O_PartWarehouse);
|
|
|
|
sb.Append("<li>");
|
|
sb.Append(onhand);
|
|
sb.Append(": ");
|
|
sb.Append(i.LT_PartByWarehouseInventory_Label_QuantityOnHand.ToString("g27"));
|
|
|
|
|
|
sb.Append("<li>");
|
|
sb.Append(onorder);
|
|
sb.Append(": ");
|
|
sb.Append(i.LT_PartByWarehouseInventory_Label_QuantityOnOrder.ToString("g27"));
|
|
|
|
if (i.LT_PartSerial_Label_List != null && i.LT_PartSerial_Label_List.Count > 0)
|
|
{
|
|
sb.Append("<li>");
|
|
sb.Append(partserials);
|
|
sb.Append(": ");
|
|
foreach (PartSerialPickList.PartSerialPickListInfo pi in i.LT_PartSerial_Label_List)
|
|
sb.Append(pi.SerialNumber + ", ");
|
|
sb.Length = sb.Length - 2;
|
|
}
|
|
|
|
|
|
|
|
sb.Append("</ul><br>");
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
PartPickList pp=PartPickList.GetOnePart(new Guid(Request.QueryString["id"]));
|
|
sb.Append("<b>");
|
|
sb.Append(pp[0].DisplayName(Util.GlobalSettings.DefaultPartDisplayFormat));
|
|
sb.Append("</b>");
|
|
|
|
|
|
sb.Append("<ul>");
|
|
|
|
|
|
|
|
sb.Append("<li>");
|
|
sb.Append(onhand);
|
|
sb.Append(": ");
|
|
sb.Append("0");
|
|
|
|
|
|
sb.Append("<li>");
|
|
sb.Append(onorder);
|
|
sb.Append(": ");
|
|
sb.Append("0");
|
|
}
|
|
|
|
|
|
litDetails.Text = sb.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|