Beispiel #1
0
 //
 protected void gvItemsList_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     paneInfo.Visible = panelAttention.Visible = panelError.Visible = panelSuccess.Visible = false;
     switch (e.CommandName)
     {
     case "xiugai":
         Entity.Items item = items.GetSingleItem(int.Parse(e.CommandArgument.ToString()));
         lbItemID.Text   = e.CommandArgument.ToString();
         txtDays.Text    = item.getDays();
         txtHour.Text    = item.getHours();
         txtMinutes.Text = item.getMinutes();
         txtSeconds.Text = item.getSeconds();
         rblIsSecondKill.SelectedValue = item.getIsSecondKill().ToLower();
         break;
     }
 }
Beispiel #2
0
    protected void ddlWomen_ItemCommand(object source, DataListCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "miao":
            Entity.Items i = item.getSeckillItem(int.Parse(e.CommandArgument.ToString()));
            Session["SeckillID"] = e.CommandArgument.ToString();

            Session["LimitTime"] = DateTime.Now
                                   .AddDays(double.Parse(i.getDays()))
                                   .AddHours(double.Parse(i.getHours()))
                                   .AddMinutes(double.Parse(i.getMinutes()))
                                   .AddSeconds(double.Parse(i.getSeconds())).ToString();

            Response.Redirect("SeckillDetails.aspx");    //?SeckillID=" + int.Parse(e.CommandArgument.ToString()) + "
            break;
        }
    }