여기 내 문제가 있습니다. 예를 들어, 리피터 행 ID를 클릭하면 특정 고객 송장으로 전송됩니다.두 개의 다른 페이지에서 데이터 가져 오기
그러나 고객 송장 페이지에서는 고객 ID가 로그인 한 경우에만 열립니다. 따라서 한 페이지 데이터에 액세스하는 두 개의 다른 페이지가 여기에 있습니다. 내 코드는 다음과 같습니다. 중계기 페이지에 있습니다. 리피터 .cs 페이지
<th>
<asp:LinkButton ID ="lnkbtnStmt" Text ="Statement" OnClick ="lnkbtnStmt_Click" runat="server"></asp:LinkButton>
<asp:HiddenField ID ="hfStmt" runat ="server" Value='<% #Eval("No")%>'/>
</th>
:
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);
}
}
그리고 다른 고객 페이지에서
. 고객이 로그인 우리는 리피터 ID를 클릭하면CustInvoice("empCustId");
방법은 작동받을 때이 페이지에서
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? –
아니요 .. 질문에서 언급 한 것처럼 중계선 행 ID에서 특정 고객의 송장으로 데이터를 전송해야합니다. – sonsha