亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? accountaction.java

?? hibernate應用測試,初學hibernate 的會員可以看看.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
            } catch (Exception e) {
                e.printStackTrace();
                AcountTableDAO.rollback();
                ActionError actionError = new ActionError(
                        "errors.generally.failed", e.getMessage());
                actionErrors.add("", actionError);
                saveErrors(request, actionErrors);
            }
            initPage(request);
            List allRoleGroup = RoleGroupDAO.selectAllRoleGroup();
            request.setAttribute("allRoleGroup", allRoleGroup);

            target = "editAccount";
        } else if (flag.equals("delete")) { //刪除賬號
            String[] acountIdAndAcountGroupId = request.getParameterValues(
                    "checkbox"); //checkbox中的值的格式為:"acountId||acountGroupId"
            String groupIdStr = request.getParameter("groupId2");
            if (acountIdAndAcountGroupId == null || groupIdStr == null)return
                    mapping.findForward("");
            int groupId = -1;
            try {
                groupId = Integer.parseInt(groupIdStr);
                for (int i = 0; i < acountIdAndAcountGroupId.length; i++) {
                    String accountIdStr = acountIdAndAcountGroupId[i].substring(
                            0, acountIdAndAcountGroupId[i].indexOf("||"));
                    AcountTable acountTable = new AcountTable();
                    acountTable.setAcountId(Integer.parseInt(accountIdStr));
                    acountTable.setDelFlag(1);
                    AcountTableDAO.updateDelFlagByAcountId(acountTable);
                }
                ActionError actionError = new ActionError(
                        "errors.generally.succese");
                actionErrors.add("addGroupSuccese", actionError);
                saveErrors(request, actionErrors);

            } catch (Exception e) {
                e.printStackTrace();
                AcountTableDAO.rollback();
                ActionError actionError = new ActionError(
                        "errors.generally.failed", e.getMessage());
                actionErrors.add("", actionError);
                saveErrors(request, actionErrors);
            }
            initPage(request);
            List allRoleGroup = RoleGroupDAO.selectAllRoleGroup();
            request.setAttribute("allRoleGroup", allRoleGroup);
            target = "editAccount";
        } else if (flag.equals("getOut")) { //把賬號從當前組移走,但不刪除賬號
            String[] acountIdAndAcountGroupId = request.getParameterValues(
                    "checkbox"); //checkbox中的值的格式為:"acountId||acountGroupId"
            String groupIdStr = request.getParameter("groupId2");
            if (acountIdAndAcountGroupId == null || groupIdStr == null)return
                    mapping.findForward("");
            int groupId = -1;
            try {
                groupId = Integer.parseInt(groupIdStr);
                for (int i = 0; i < acountIdAndAcountGroupId.length; i++) {
                    String accountGroupIdStr = acountIdAndAcountGroupId[i].
                                               substring(
                            acountIdAndAcountGroupId[i].indexOf("||") + 2);
                    AcountGroupDAO.deleteAcountGroupByselfId(Integer.parseInt(
                            accountGroupIdStr));
                }
                ActionError actionError = new ActionError(
                        "errors.generally.succese");
                actionErrors.add("addGroupSuccese", actionError);
                saveErrors(request, actionErrors);
            } catch (Exception e) {
                e.printStackTrace();
                AcountTableDAO.rollback();
                ActionError actionError = new ActionError(
                        "errors.generally.failed", e.getMessage());
                actionErrors.add("", actionError);
                saveErrors(request, actionErrors);
            }
            initPage(request);
            List allRoleGroup = RoleGroupDAO.selectAllRoleGroup();
            request.setAttribute("allRoleGroup", allRoleGroup);
            target = "editAccount";
        } else if (flag.equals("goModify")) {
            String acountIdStr = request.getParameter("acountId");
            if (acountIdStr == null)return mapping.findForward("");
            try {
                AcountTable acount = AcountTableDAO.selectAcountTableByacountId(
                        Integer.parseInt(acountIdStr));
                request.setAttribute("acount", acount);
                if (acount.getClientId() > 0) {
                    ClientTable client = ClientTableDAO.
                                         selectClientTableByclientId(
                                                 acount.getClientId());
                    request.setAttribute("detailObj", client);

                } else if (acount.getCompUserId() > 0) {
                    CompUser compUser = CompUserDAO.selectCompUserBycompUserId(
                            acount.getCompUserId());
                    request.setAttribute("detailObj", compUser);
                } else if (acount.getShmId() > 0) {
                    StorehouseShmanagerView shManager =
                            StorehouseShmanagerViewDAO.
                            selectStorehouseShmanagerViewByshmId(acount.
                            getShmId());
                    request.setAttribute("detailObj", shManager);
                } else {
                    return mapping.findForward("");
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
            target = "modifyAcount";
        } else if (flag.equals("modify")) {
            String accountName = request.getParameter("account");
            String pwd = request.getParameter("pwd");
            String typeFlag = request.getParameter("type");
            String idStr = request.getParameter("id");
            String acountIdStr = request.getParameter("acountId");
            int id = -1;
            AcountTable accountTable = new AcountTable();
            accountTable.setAccountName(accountName);
            accountTable.setPwd(pwd);
            try {
                id = new Integer(idStr).intValue();
                int acountId = Integer.parseInt(acountIdStr);
                byte[] tmpC = type.getBytes("ISO8859-1");
                accountTable.setAcountId(acountId);
                type = new String(tmpC, "gb2312");
                if (type.equals("client")) {
                    accountTable.setClientId(id);
                } else if (type.equals("compUser")) {
                    accountTable.setCompUserId(id);
                } else if (type.equals("shm")) {
                    accountTable.setShmId(id);
                }
                AcountTableDAO.updateAcountTable(accountTable);

                AcountTable acount = AcountTableDAO.selectAcountTableByacountId(
                        acountId);
                request.setAttribute("acount", acount);
                if (acount.getClientId() > 0) {
                    ClientTable client = ClientTableDAO.
                                         selectClientTableByclientId(
                                                 acount.getClientId());
                    request.setAttribute("detailObj", client);

                } else if (acount.getCompUserId() > 0) {
                    CompUser compUser = CompUserDAO.selectCompUserBycompUserId(
                            acount.getCompUserId());
                    request.setAttribute("detailObj", compUser);
                } else if (acount.getShmId() > 0) {
                    StorehouseShmanagerView shManager =
                            StorehouseShmanagerViewDAO.
                            selectStorehouseShmanagerViewByshmId(acount.
                            getShmId());
                    request.setAttribute("detailObj", shManager);
                } else {
                    return mapping.findForward("");
                }
                ActionError actionError = new ActionError(
                        "errors.generally.succese");
                actionErrors.add("addGroupSuccese", actionError);
                saveErrors(request, actionErrors);

            } catch (Exception e) {
                e.printStackTrace();
                AcountTableDAO.rollback();
                ActionError actionError = new ActionError(
                        "errors.generally.failed", e.getMessage());
                actionErrors.add("", actionError);
                saveErrors(request, actionErrors);
                return mapping.findForward("modifyAcount");
            }
            target = "modifyAcount";
        } else if (flag.equals("gotoOpenAcount")) {
            initPage(request);
            List allRoleGroup = RoleGroupDAO.selectAllRoleGroup();
            request.setAttribute("allRoleGroup", allRoleGroup);
            target = "gotoOpenAcount";
        }

        else if (flag.equals("openAcount")) { //開通賬號
            String[] acountIdArry = request.getParameterValues("checkbox");
            if (acountIdArry == null)return mapping.findForward("");
            try {
                for (int i = 0; i < acountIdArry.length; i++) {
                    AcountTable acount = new AcountTable();
                    acount.setAcountId(Integer.parseInt(acountIdArry[i]));
                    acount.setOpenFlag(1); //設置開通標志
                    acount.setOpenDate(java.sql.Date.valueOf(com.tool.MyDate.
                            getDate("-")));
                    AcountTableDAO.updateOpenFlagByAcountId(acount);
                }
                ActionError actionError = new ActionError(
                        "errors.generally.succese");
                actionErrors.add("addGroupSuccese", actionError);
                saveErrors(request, actionErrors);
            } catch (Exception e) {
                e.printStackTrace();
                ActionError actionError = new ActionError(
                        "errors.generally.failed", e.getMessage());
                actionErrors.add("", actionError);
                saveErrors(request, actionErrors);
            }
            initPage(request);
            List allRoleGroup = RoleGroupDAO.selectAllRoleGroup();
            request.setAttribute("allRoleGroup", allRoleGroup);
            target = "gotoOpenAcount";
        } else if (flag.equals("closeAcount")) { //封鎖賬號
            String[] acountIdArry = request.getParameterValues("checkbox");
            if (acountIdArry == null)return mapping.findForward("");
            try {
                for (int i = 0; i < acountIdArry.length; i++) {
                    AcountTable acount = new AcountTable();
                    acount.setAcountId(Integer.parseInt(acountIdArry[i]));
                    acount.setOpenFlag(0); //設置封鎖標志
                    acount.setOpenDate(java.sql.Date.valueOf(com.tool.MyDate.
                            getDate("-")));
                    AcountTableDAO.updateOpenFlagByAcountId(acount);
                }
                ActionError actionError = new ActionError(
                        "errors.generally.succese");
                actionErrors.add("addGroupSuccese", actionError);
                saveErrors(request, actionErrors);
            } catch (Exception e) {
                e.printStackTrace();
                ActionError actionError = new ActionError(
                        "errors.generally.failed", e.getMessage());
                actionErrors.add("", actionError);
                saveErrors(request, actionErrors);
            }
            initPage(request);
            List allRoleGroup = RoleGroupDAO.selectAllRoleGroup();
            request.setAttribute("allRoleGroup", allRoleGroup);
            target = "gotoOpenAcount";
        }
        return mapping.findForward(target);
    }

    //初始化并獲得分頁
    private Page initPage(HttpServletRequest request) {
        String currentPageStr = request.getParameter("currentPage");
        String queryStr = QueryStrCreator.create("acountAndGroup", request);
        int currentPage = 1; //當前頁碼
        int size = 20; //每頁的記錄數

        try { //防止從地址欄直接輸入非法頁碼
            if (currentPageStr != null) currentPage = new Integer(
                    currentPageStr).intValue();
        } catch (Exception e) {
            e.printStackTrace();
        }
        //處理分頁
        //會話中是否已有分頁生成工具
        PageTool pageTool = null;
        HttpSession session = request.getSession();
        pageTool = (PageTool) session.getAttribute("acountPageTool"); //有,則直接拿來用
        if (pageTool == null) { //沒有,則新建,并放進會話中,以備下次用
            pageTool = PageToolBuilder.builder(new AcountTableDAO());
            session.setAttribute("acountPageTool", pageTool);
        }
        //由分頁工具生成分頁
        Page page = null;
        try {
            String flag = request.getParameter("flag");
            if (flag.equals("query") || flag.equals("queryForImport")) //查詢時的分頁
                page = pageTool.createPage(currentPage, size, queryStr);
            else //其它非查詢的分頁
                page = pageTool.createPage(currentPage, size);
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
        //將分頁放進請求中,分發到下一個頁面顯示
        request.setAttribute("allAcountPage", page);
        return page;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丰满少妇xxxbbb| 亚洲综合在线第一页| 欧美大片日本大片免费观看| 久久成人免费网站| 日韩欧美国产三级电影视频| 色婷婷精品大在线视频| 91蜜桃婷婷狠狠久久综合9色| 欧美一区二区三区日韩| 欧美一卡在线观看| 精品欧美一区二区久久 | 3d动漫精品啪啪一区二区竹菊| 欧美喷水一区二区| 日韩欧美国产1| 久久免费精品国产久精品久久久久| 精品欧美乱码久久久久久| 久久精品人人做人人爽人人| 欧美国产日产图区| 亚洲精品写真福利| 五月婷婷激情综合| 韩国一区二区三区| 不卡视频在线看| 91国产福利在线| 91精品国产综合久久精品性色| 精品精品欲导航| 亚洲欧美自拍偷拍色图| 亚洲午夜久久久久| 玖玖九九国产精品| 成人一区二区在线观看| 91久久精品网| 日韩视频永久免费| 国产精品久99| 五月激情丁香一区二区三区| 国产在线一区二区综合免费视频| 不卡视频一二三四| 欧美精品在欧美一区二区少妇| 久久综合成人精品亚洲另类欧美 | 欧美色老头old∨ideo| 日韩三级视频在线看| 日本一区二区在线不卡| 一区二区免费视频| 韩日精品视频一区| 在线看国产一区二区| 久久久噜噜噜久久中文字幕色伊伊| 国产精品毛片高清在线完整版 | 成人h动漫精品| 欧美丰满一区二区免费视频 | 免费在线观看不卡| 成人激情小说乱人伦| 欧美精三区欧美精三区| 亚洲国产精品av| 日本aⅴ免费视频一区二区三区| 成人小视频在线| 69堂国产成人免费视频| 成人欧美一区二区三区在线播放| 日本亚洲天堂网| 99久久久久免费精品国产 | 麻豆成人在线观看| 91天堂素人约啪| 久久青草欧美一区二区三区| 亚洲成人综合视频| 不卡在线观看av| 日韩欧美一区中文| 亚洲一区中文日韩| 国产98色在线|日韩| 日韩美女在线视频 | 色欧美片视频在线观看| 久久久久久电影| 蜜臀精品一区二区三区在线观看 | 国产精品资源在线看| 91.麻豆视频| 一区二区三区在线观看动漫| 国产精品一色哟哟哟| 日韩亚洲欧美一区二区三区| 一区二区三区高清| 99久久综合99久久综合网站| 精品国产一区二区三区久久久蜜月 | 国产欧美日韩视频一区二区| 看片网站欧美日韩| 欧美老女人在线| 亚洲免费观看高清完整版在线 | 日韩主播视频在线| 91国产成人在线| 中文字幕一区在线观看| 国产成人免费在线观看不卡| 精品国产制服丝袜高跟| 毛片av一区二区| 91精品国产综合久久福利软件 | 亚洲国产视频直播| 色综合久久中文综合久久牛| 国产精品二三区| www.欧美色图| 亚洲日本在线看| 91免费观看在线| 亚洲精品视频在线| 91视频xxxx| 亚洲毛片av在线| 色噜噜狠狠成人中文综合| 亚洲女与黑人做爰| 91色婷婷久久久久合中文| 国产精品国产三级国产普通话99| 成人伦理片在线| 国产成人av一区| 国产午夜亚洲精品午夜鲁丝片| 国产尤物一区二区在线| 久久精品男人的天堂| 国产成人精品免费一区二区| 国产精品久久久久影院| 97国产一区二区| 亚洲综合丝袜美腿| 欧美影院一区二区| 日韩电影一区二区三区四区| 欧美一级欧美一级在线播放| 蜜臀av性久久久久蜜臀aⅴ | 国产亚洲视频系列| 成人激情小说乱人伦| 一区二区国产盗摄色噜噜| 欧美日韩欧美一区二区| 日韩电影一区二区三区四区| 精品精品国产高清a毛片牛牛| 国产传媒日韩欧美成人| 亚洲天堂2014| 欧美日韩精品一区二区三区四区| 日本网站在线观看一区二区三区 | 亚洲色欲色欲www| 在线观看av不卡| 蜜臀av一区二区在线观看| 国产日韩av一区二区| 97久久精品人人澡人人爽| 性久久久久久久久久久久| 欧美成人伊人久久综合网| 成人综合激情网| 亚洲在线观看免费视频| 91精品国产欧美一区二区成人| 国模冰冰炮一区二区| 中文字幕一区在线观看| 777午夜精品免费视频| 国产精品自拍网站| 亚洲影视在线播放| 久久看人人爽人人| 91国偷自产一区二区三区观看| 日韩国产欧美三级| 国产精品欧美精品| 欧美精品久久久久久久久老牛影院 | 日日夜夜一区二区| 久久蜜桃av一区精品变态类天堂 | 国产一区二区视频在线| 亚洲欧美偷拍三级| 日韩欧美成人激情| 97超碰欧美中文字幕| 奇米影视一区二区三区| 中文字幕欧美区| 欧美精品丝袜中出| caoporen国产精品视频| 日韩精品视频网站| **网站欧美大片在线观看| 日韩欧美国产一区二区在线播放| 精品日韩欧美在线| 欧美在线free| 成人avav在线| 韩国女主播成人在线| 亚洲综合男人的天堂| 国产欧美日韩三级| 日韩欧美国产综合一区| 91免费看片在线观看| 国产精品夜夜爽| 日韩中文字幕av电影| 综合av第一页| 久久综合久久久久88| 欧美日韩一区二区三区四区 | 欧美日韩在线不卡| aaa国产一区| 韩国女主播成人在线观看| 夜夜嗨av一区二区三区| 国产亚洲精品中文字幕| 欧美成人精品1314www| 欧美综合色免费| 91麻豆精东视频| av影院午夜一区| 国产精一区二区三区| 男女男精品视频| 亚洲丶国产丶欧美一区二区三区| 日韩一区欧美小说| 国产欧美日韩亚州综合| 精品区一区二区| 日韩一区二区在线观看视频| 欧美伊人精品成人久久综合97| 99国产麻豆精品| 成人app在线观看| 岛国一区二区三区| 国产精品99久久久| 国产乱子伦视频一区二区三区| 久久国产综合精品| 蜜臀精品一区二区三区在线观看| 丝袜a∨在线一区二区三区不卡| 亚洲综合丝袜美腿| 亚洲一区二区在线免费看| 一级做a爱片久久| 亚洲黄色性网站| 亚洲精品欧美激情| 一区二区三区四区视频精品免费 |