这是我的问题。假设通过例子,当我点击中继行ID时,它将转移到特定客户的发票上。从两个不同的页面获取数据
但是在客户发票页面中,只有当客户Id登录时才会打开。因此,这里有两个不同的页面访问一个页面数据。我的代码如下。 在中继器的页面。
<th>
<asp:LinkButton ID ="lnkbtnStmt" Text ="Statement" OnClick ="lnkbtnStmt_Click" runat="server"></asp:LinkButton>
<asp:HiddenField ID ="hfStmt" runat ="server" Value='<% #Eval("No")%>'/>
</th>
直放站的.cs页:
public void lnkbtnStmt_Click(object sender, EventArgs e)
{
int rptIndex = ((RepeaterItem)((LinkButton)sender).NamingContainer).ItemIndex;
string hfItem = Convert.ToString(((HiddenField)RptEmpCustInvoise.Items[rptIndex].FindControl("hfStmt")).Value);
Customer_Ledger_Entries custlist = new Customer_Ledger_Entries();
List<Customer_Ledger_Entries_Filter> cFilter = new List<Customer_Ledger_Entries_Filter>();
Customer_Ledger_Entries_Filter cfield = new Customer_Ledger_Entries_Filter();
cfield.Field = Customer_Ledger_Entries_Fields.Customer_No;
cfield.Criteria = hfItem;
cFilter.Add(cfield);
Customer_Ledger_Entries[] culist = cls.wsCustInvoice.ReadMultiple(cFilter.ToArray(), null, 1);
if (culist.Length > 0)
{
Response.Redirect("frmCustomerInvoice.aspx?Customer_No=" + hfItem);
}
}
而在另一个客户页面。当客户获得登录并CustInvoice("empCustId");
方法的工作,当我们点击转发ID
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
GetOpeningBal();
bindCustInvoice(objSession.getSession(HttpContext.Current, "NonEmpCode"));
string empCustId = Request.QueryString["Customer_No"];
if (empCustId.Length != 0)
{
CustInvoice("empCustId");
}
GetClosingBal();
}
}
catch (Exception ex)
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), string.Empty, "alert('" + ex.Message.ToString() + "');", true);
}
}
在这个页面中,bindCustInvoice()
方法效果。 任何一个可以给我的解决方案?
好了,你有什么问题吗?问题可以更清楚 – snit80
所以你的意思是问题是有人可以在不登录的情况下访问中继器:O? –
no ..正如我提到的问题,我需要从中继器行ID传输数据到特定客户的发票。 – sonsha