예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Service_PlanAgentLevel.PlanAgentLevelClient bll = new Service_PlanAgentLevel.PlanAgentLevelClient();
        switch (GetRequest.GetRequestValue("action"))
        {
        case "del":
            bll.Del(GetRequest.GetInt32("id"));
            bll.Abort();
            bll.Close();
            Success();
            break;

        default:
            list = bll.List();
            bll.Abort();
            bll.Close();
            break;
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Service_PlanAgentLevel.PlanAgentLevelClient bll = new Service_PlanAgentLevel.PlanAgentLevelClient();
        int id = GetRequest.GetInt32("id", Method.All, 0);

        if (Request.HttpMethod.ToLower() == "post")
        {
            __Model.id   = id;
            __Model.Name = GetRequest.GetRequestValue("Name", Method.Post);
            bll.Edit(__Model);
            bll.Abort();
            bll.Close();
            Success();
        }
        else
        {
            if (id > 0)
            {
                __Model = bll.Info(id);
                bll.Abort();
                bll.Close();
            }
        }
    }