Example #1
0
    public void testSetAllSetting()
    {
        //Model.ChannelProgram mcp, Model.ElementRelation[] mer,Model.StationRelation[] msr
        Model.ChannelProgram mcp = new Model.ChannelProgram();
        mcp.CP_ID      = 170;
        mcp.DataTypeID = 1;
        mcp.TimeTypeID = 8;


        Model.ElementRelation[] mer = new Model.ElementRelation[3];

        Model.ElementRelation mer_single1 = new Model.ElementRelation();
        mer_single1.ElementID    = 1;
        mer_single1.ElementOrder = 0;

        Model.ElementRelation mer_single2 = new Model.ElementRelation();
        mer_single2.ElementID    = 3;
        mer_single2.ElementOrder = 1;

        Model.ElementRelation mer_single3 = new Model.ElementRelation();
        mer_single3.ElementID    = 7;
        mer_single3.ElementOrder = 2;

        mer[0] = mer_single1;
        mer[1] = mer_single2;
        mer[2] = mer_single3;


        Model.StationRelation[] msr = new Model.StationRelation[3];

        Model.StationRelation msr_single1 = new Model.StationRelation();
        msr_single1.SelectID     = 172;
        msr_single1.StationID    = 50774;
        msr_single1.StationOrder = 0;

        Model.StationRelation msr_single2 = new Model.StationRelation();
        msr_single2.SelectID     = 30;
        msr_single2.StationID    = 56778;
        msr_single2.StationOrder = 1;

        Model.StationRelation msr_single3 = new Model.StationRelation();
        msr_single3.SelectID     = 512;
        msr_single3.StationID    = 59432;
        msr_single3.StationOrder = 2;

        msr[0] = msr_single1;
        msr[1] = msr_single2;
        msr[2] = msr_single3;



        BLL.SettingBLL sbll    = new BLL.SettingBLL();
        String[]       display = new String[5];
        display     = sbll.setAllSetting(mcp, mer, msr);
        Label1.Text = display[0] + "/" + display[1] + "/" + display[2] + "/" + display[3] + "/" + display[4];
    }
Example #2
0
    public void testinsertSetStationsInfoReturnID()
    {
        Model.StationRelation msr = new Model.StationRelation();
        msr.StationID   = 54511;
        msr.StationName = "beijingReturnID2";

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        //int done = sbll.setStationsInfo(msr, "insert");
        Label1.Text = sbll.insertStationsInfoReturnID(msr).StationTableID.ToString() + "---" + sbll.insertStationsInfoReturnID(msr).SelectID.ToString();
    }
Example #3
0
    public void testdeleteSetCP()
    {
        Model.ChannelProgram mcp = new Model.ChannelProgram();
        mcp.CP_ID = 171;

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setCP(mcp, "delete");

        Label1.Text = done.ToString();
    }
Example #4
0
    public void testdeleteSetStationsInfo()
    {
        Model.StationRelation msr = new Model.StationRelation();
        msr.StationTableID = 683;

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setStationsInfo(msr, "delete");

        Label1.Text = done.ToString();
    }
Example #5
0
    public void testSetCPfid()
    {
        Model.ChannelProgram mcp = new Model.ChannelProgram();
        mcp.FatherID = 172;
        mcp.CP_ID    = 170;

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setCPnewFather(mcp);

        Label1.Text = done.ToString();
    }
Example #6
0
    public void testupdateSetCP()
    {
        Model.ChannelProgram mcp = new Model.ChannelProgram();
        mcp.CP_Name = "测试0频道";
        mcp.CP_ID   = 170;

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setCP(mcp, "update");

        Label1.Text = done.ToString();
    }
Example #7
0
    public void testinsertSetCP()
    {
        Model.ChannelProgram mcp = new Model.ChannelProgram();
        mcp.CP_Name  = "测试栏目3";
        mcp.FatherID = 170;

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setCP(mcp, "insert");

        Label1.Text = done.ToString();
    }
Example #8
0
    public void testinsertSetStationsInfo()
    {
        Model.StationRelation msr = new Model.StationRelation();
        msr.StationID = 54511;
        //msr.StationName = "new-beijing3";

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setStationsInfo(msr, "insert");

        Label1.Text = done.ToString();
    }
Example #9
0
    public void testupdateSetStationsInfo()
    {
        Model.StationRelation msr = new Model.StationRelation();
        msr.StationID      = 55555;
        msr.StationName    = "new-beijingfff";
        msr.StationTableID = 682;

        BLL.SettingBLL sbll = new BLL.SettingBLL();
        int            done = sbll.setStationsInfo(msr, "update");

        Label1.Text = done.ToString();
    }