protected void btn_ok_Click(object sender, EventArgs e)
    {
        if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 0)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL((int)ViewState["Catalog"]);
            panel1.GetData(bll.Model);
            bll.Update();
        }
        else if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 1)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL();
            panel1.GetData(bll.Model);

            if (bll.Model.SuperID == 0)
            {
                bll.Model.SuperID = 1;
            }

            bll.Add();
        }
        DataCache.RemoveCache("Cache-TreeTableBLL-GetRelationTableSourceData-MCS_OA.dbo.KB_Catalog-MCS_OA.dbo.KB_Catalog-ID-Name");
        DataCache.RemoveCache("Cache-TreeTableBLL-GetAllNode-MCS_OA.dbo.KB_Catalog");
        Response.Redirect("CatalogManager.aspx");
        //panel1.BindData(bll.Model);
    }
示例#2
0
    protected void btn_ok_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(((TextBox)panel1.FindControl("KB_Catalog_Name")).Text.Trim()))
        {
            MessageBox.Show(this, "对不起,目录名称不能为空!");
            return;
        }

        if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 0)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL((int)ViewState["Catalog"]);
            panel1.GetData(bll.Model);
            bll.Update();
        }
        else if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 1)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL();
            panel1.GetData(bll.Model);

            if (bll.Model.SuperID == 0)
            {
                bll.Model.SuperID = 1;
            }

            bll.Add();
        }
        DataCache.RemoveCache("Cache-TreeTableBLL-GetRelationTableSourceData-MCS_OA.dbo.KB_Catalog-MCS_OA.dbo.KB_Catalog-ID-Name");
        DataCache.RemoveCache("Cache-TreeTableBLL-GetAllNode-MCS_OA.dbo.KB_Catalog");
        Response.Redirect("CatalogManager.aspx");
        //panel1.BindData(bll.Model);
    }
    protected void btn_ok_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(((TextBox)panel1.FindControl("KB_Catalog_Name")).Text.Trim()))
        {
            MessageBox.Show(this, "对不起,目录名称不能为空!");
            return;
        }

        if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 0)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL((int)ViewState["Catalog"]);
            panel1.GetData(bll.Model);
            bll.Update();
        }
        else if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 1)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL();
            panel1.GetData(bll.Model);

            if (bll.Model.SuperID == 0) bll.Model.SuperID = 1;

            bll.Add();
        }
        DataCache.RemoveCache("Cache-TreeTableBLL-GetRelationTableSourceData-MCS_OA.dbo.KB_Catalog-MCS_OA.dbo.KB_Catalog-ID-Name");
        DataCache.RemoveCache("Cache-TreeTableBLL-GetAllNode-MCS_OA.dbo.KB_Catalog");
        Response.Redirect("CatalogManager.aspx");
        //panel1.BindData(bll.Model);
    }
    protected void btn_ok_Click(object sender, EventArgs e)
    {
        if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 0)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL((int)ViewState["Catalog"]);
            panel1.GetData(bll.Model);
            bll.Update();
        }
        else if (int.Parse(MCSTabControl1.SelectedTabItem.Value.ToString()) == 1)
        {
            KB_CatalogBLL bll = new KB_CatalogBLL();
            panel1.GetData(bll.Model);

            if (bll.Model.SuperID == 0) bll.Model.SuperID = 1;

            bll.Add();
        }
        DataCache.RemoveCache("Cache-TreeTableBLL-GetRelationTableSourceData-MCS_OA.dbo.KB_Catalog-MCS_OA.dbo.KB_Catalog-ID-Name");
        DataCache.RemoveCache("Cache-TreeTableBLL-GetAllNode-MCS_OA.dbo.KB_Catalog");
        Response.Redirect("CatalogManager.aspx");
        //panel1.BindData(bll.Model);
    }