示例#1
0
    protected void DataListworks_ItemCommand(object source, DataListCommandEventArgs e)
    {
        int Wscore = 0;
        int Wid    = Int32.Parse(DataListworks.DataKeys[e.Item.ItemIndex].ToString());

        LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
        if (e.CommandName == "G")
        {
            Wscore = 12;
        }
        if (e.CommandName == "A")
        {
            Wscore = 10;
        }
        if (e.CommandName == "B")
        {
            Wscore = 8;
        }
        if (e.CommandName == "C")
        {
            Wscore = 6;
        }
        if (e.CommandName == "D")
        {
            Wscore = 4;
        }
        if (e.CommandName == "E")
        {
            Wscore = 2;
        }
        ws.ScoreWork(Wid, Wscore);
        System.Threading.Thread.Sleep(200);
        ShowDoneWorks();
    }