diff --git a/北京北汽/SCP/Views/SupplierData/SCP_ASN.aspx.cs b/北京北汽/SCP/Views/SupplierData/SCP_ASN.aspx.cs index c6bdcca..47660c2 100644 --- a/北京北汽/SCP/Views/SupplierData/SCP_ASN.aspx.cs +++ b/北京北汽/SCP/Views/SupplierData/SCP_ASN.aspx.cs @@ -104,13 +104,19 @@ namespace SCP.SupplierData protected void btnDetail_Click(object sender, EventArgs e) { - if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) + int[] selections = Grid_V_TB_ASN.SelectedRowIndexArray; + if (selections.Count() == 0) { PageContext.RegisterStartupScript(Alert.GetShowInTopReference(GetResourceKey("没有选择数据!"))); return; } - object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; - string AsnBillNum = rowDataKeys[1] as string; + string AsnBillNum = ""; + foreach (int rowIndex in selections) + { + AsnBillNum = Grid_V_TB_ASN.DataKeys[rowIndex][1] as string; + } + //object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; + //string AsnBillNum = rowDataKeys[1] as string; PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); } protected void btnShow_Click(object sender, EventArgs e) diff --git a/北京北汽/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs b/北京北汽/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs index 779df74..54806e9 100644 --- a/北京北汽/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs +++ b/北京北汽/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs @@ -100,22 +100,32 @@ namespace SCP.SupplierData btnException2.Hidden = true; } } - SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj => - { - if (retobj.State == ReturnStatus.Succeed) - { - if (retobj.Result.Count() > 0) - { - this.btnCreateBarCode.Enabled = false; - } - else - { - this.btnCreateBarCode.Enabled = true; - } - } - }); - + }); + var balist = SCP_BARCODE_CONTROLLER.GetBacode(TXT_AsnBillNum.Text.Trim()); + if (balist.Count() > 0) + { + this.btnCreateBarCode.Enabled = false; + } + else + { + this.btnCreateBarCode.Enabled = true; + } + //SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj => + //{ + // if (retobj.State == ReturnStatus.Succeed) + // { + // if (retobj.Result.Count() > 0) + // { + // this.btnCreateBarCode.Enabled = false; + // } + // else + // { + // this.btnCreateBarCode.Enabled = true; + // } + // } + //}); + } public void BindDetail() {