// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   ChannelAction.java

package com.keyshop.shop.channel.controller;

import com.keyshop.pub.bo.PubHibernate;
import com.keyshop.pub.controller.PubAction;
import com.keyshop.pub.model.PubBean;
import com.keyshop.pub.util.*;
import com.keyshop.shop.channel.bo.ChannelBO;
import com.keyshop.shop.channel.manager.ChannelManager;
import com.keyshop.shop.channel.model.*;
import com.keyshop.shop.channel.util.ChannelConst;
import java.io.File;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.*;

// Referenced classes of package com.keyshop.shop.channel.controller:
//            ChannelForm

public class ChannelAction extends PubAction
{

    public ChannelAction()
    {
    }

    public void initClassName()
    {
        boClass = "com.keyshop.shop.channel.bo.ChannelBO";
        beanClass = "com.keyshop.shop.channel.model.Channel";
        formBeanClass = "com.keyshop.shop.channel.controller.ChannelForm";
    }

    public ActionForward performChangechannel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        return mapping.findForward("add");
    }

    public ActionForward performChangepagetype(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        ChannelForm iform = (ChannelForm)form;
        Channel bean = (Channel)iform.getBean();
        if(StringUtil.isEmpty(request.getParameter("bean.pageType")))
            bean.setPageType("");
        return mapping.findForward("add");
    }

    public ActionForward performAdd(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        try
        {
            ChannelForm iform = (ChannelForm)form;
            iform.clear();
            iform.setPageType("add");
        }
        catch(Exception e)
        {
            generalError(request, e);
            e.printStackTrace();
            return mapping.findForward("fail");
        }
        return mapping.findForward("add");
    }

 
    protected String getSelectSQL()
    {
        String sql = " from Channel as c where 1=1";
        return sql;
    }


}
