public string GetStoreName(int storeid)
 {
     DataRow[] dr = StoreDT.Select("ID=" + storeid);
     if (dr.Length > 0)
     {
         return(dr[0]["StoreName"].ToString());
     }
     else
     {
         return("");
     }
 }
Exemplo n.º 2
0
    //---------------RPT
    protected void Order_RPT_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            Repeater rpt       = e.Item.FindControl("Pro_RPT") as Repeater;
            Label    storeName = e.Item.FindControl("Store_L") as Label;
            if (rpt == null || storeName == null)
            {
                return;
            }
            DataRowView drv = e.Item.DataItem as DataRowView;
            DataRow[]   dr  = StoreDT.Select("ID=" + drv["StoreID"]);
            storeName.Text = dr[0]["StoreName"].ToString();

            OrderDT.DefaultView.RowFilter = "OrderNo='" + drv["OrderNo"] + "'";
            rpt.DataSource = OrderDT.DefaultView.ToTable();
            rpt.DataBind();
        }
    }