Ejemplo n.º 1
0
        protected void Egv_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "Del":
                M_IServer model = new B_IServer().SeachById(DataConverter.CLng(e.CommandArgument));
                Serverbll.DeleteById(model.QuestionId);
                break;

            default:
                break;
            }
            DataBind();
        }
Ejemplo n.º 2
0
        protected void resultsRepeater_w_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "Del":
                M_IServer model = Serverbll.SeachById(DataConverter.CLng(e.CommandArgument));
                Serverbll.DeleteById(model.QuestionId);
                MyBind();
                break;

            default:
                break;
            }
        }
Ejemplo n.º 3
0
        public string IServer_API()
        {
            string    action = Request["action"] ?? "";
            M_IServer isMod  = isBll.SelReturnModel(Mid);

            if (isMod == null)
            {
                return("");
            }
            if (isMod.UserId != mu.UserID)
            {
                return("你无权操作该内容");
            }
            switch (action)
            {
            //case "state":
            //    {
            //        int state = DataConverter.CLng(Request["state"]);
            //        isBll.UpdateState(Mid,state);
            //    }
            //    break;
            case "solve":
            {
                isMod.State     = isBll.GetStatus(3);
                isMod.SolveTime = DateTime.Now;
                isBll.UpdateByID(isMod);
            }
            break;

            case "close":
            {
                isBll.UpdateState(Mid, -1);
            }
            break;

            case "udel":    //用户删除
            {
                isBll.DeleteById(Mid);
            }
            break;
            }
            return(Success.ToString());
        }