예제 #1
0
        protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
        {
            if (e.CommandName == "view")
            {
                int i = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);
                ProductDescri.GetDesc(i);
                ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup();", true);
            }
            else
            {
                int listvalue = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);

                ProductOrderPage.GetDesc(listvalue);
                ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowProductOrder();", true);
            }
        }
예제 #2
0
        protected void GridView_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Order")
            {
                int rowindex = Convert.ToInt32(e.CommandArgument);
                ProductOrderPage.GetDesc(rowindex);
                ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowProductOrder();", true);
            }
            else if (e.CommandName == "Select")
            {
                int id = Convert.ToInt32(e.CommandArgument);

                ProductDescri.GetDesc(id);

                ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup();", true);
            }
        }