You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.5 KiB
89 lines
2.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using CK.SCP.Controller;
|
|
using CK.SCP.Models.ScpEntity;
|
|
using CK.SCP.Utils;
|
|
using FineUI;
|
|
|
|
namespace SCP.青岛一汽法雷奥.SupplierData
|
|
{
|
|
public partial class SCP_SHIP_DETAIL_BARCODE : PageBase
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
TranslatorAgents(Toolbar1);
|
|
TranslatorAgent(Grid1);
|
|
BindData();
|
|
}
|
|
}
|
|
|
|
public void BindData()
|
|
{
|
|
Search(ret => {
|
|
Grid1.RecordCount = ret.Count();
|
|
Grid1.DataSource = ret.ToList();
|
|
Grid1.DataBind();
|
|
});
|
|
|
|
}
|
|
public void Search(Action<IQueryable<TS_BARCODE>> p_action)
|
|
{
|
|
string billnum = GetQueryValue("BillNo");
|
|
TS_BARCODE _code = new TS_BARCODE();
|
|
_code.BillNum = billnum;
|
|
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(_code, ret => {
|
|
if (ret.State == ReturnStatus.Succeed)
|
|
{
|
|
p_action(ret.Result);
|
|
}
|
|
});
|
|
}
|
|
//查询
|
|
protected void btnSearch_OnClick(object sender, EventArgs e)
|
|
{
|
|
BindData();
|
|
}
|
|
//导出
|
|
|
|
|
|
|
|
protected void btnOutput_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
//补打条码
|
|
protected void btnPrintRe_Click(object sender, EventArgs e)
|
|
{
|
|
List<string> _ls = new List<string>();
|
|
for (int i = 0, count = Grid1.Rows.Count; i < count; i++)
|
|
{
|
|
if (Grid1.SelectedRowIndexArray.Contains(i))
|
|
{
|
|
object[] rowDataKeys = Grid1.DataKeys[i];
|
|
int id = ConvertHelper.To<int>(rowDataKeys[0]);
|
|
_ls.Add(id.ToString());
|
|
}
|
|
}
|
|
|
|
var str=string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=Material&data=101&type=pdf&filename=标签.pdf&Barcode={0}&open=\")",string.Join("_",_ls.ToArray()));
|
|
PageContext.RegisterStartupScript(str);
|
|
|
|
}
|
|
//查询
|
|
protected void btnSearch_Click(object sender, EventArgs e)
|
|
{
|
|
BindData();
|
|
}
|
|
|
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
|
{
|
|
BindData();
|
|
}
|
|
}
|
|
}
|