Esempio n. 1
0
    protected override void CurrentContent_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Create":
            Redirect("../../ServiceLayer/Resource/ResourceEdit.aspx");
            break;

        case "CreateVer":
            Redirect("../../ServiceLayer/Resource/ResourceVerEdit.aspx?ResourceTypeID=" + ResourceTypeID.ToString() + "&ResourceID=" + e.CommandArgument.ToString());
            break;

        case "Modify":
            Redirect("../../ServiceLayer/Resource/ResourceEdit.aspx?ResourceTypeID=" + e.CommandArgument.ToString());
            break;

        case "ViewVer":
            Redirect("../../ServiceLayer/Resource/ResourceVerList.aspx?ResourceTypeID=" + ResourceTypeID.ToString() + "&ResourceID=" + e.CommandArgument.ToString());
            break;

        case "Remove":
            objResourceRule.DeleteResource(e.CommandArgument.ToString());
            RenderPage();
            break;
        }
    }
Esempio n. 2
0
    protected override void CurrentTool_ItemCommand(object sender, WTF.Controls.MyCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Save":
            SaveInfo();

            break;

        case "Back":
            Redirect("../../ServiceLayer/Resource/ResourceVerList.aspx?ResourceTypeID=" + ResourceTypeID.ToString() + "&ResourceID=" + ResourceID.ToString());
            break;
        }
    }
Esempio n. 3
0
    protected override void CurrentTool_ItemCommand(object sender, WTF.Controls.MyCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Create":
            Redirect("../../ServiceLayer/Resource/ResourceEdit.aspx?ResourceTypeID=" + ResourceTypeID.ToString());
            break;

        case "CreateVer":
            Redirect("../../ServiceLayer/Resource/ResourceVerEdit.aspx?ResourceTypeID=" + ResourceTypeID.ToString() + "&ResourceID=" + gdvContent.SelectedRowFirstKey);
            break;

        case "ViewVer":
            Redirect("../../ServiceLayer/Resource/ResourceVerList.aspx?ResourceTypeID=" + ResourceTypeID.ToString() + "&ResourceID=" + gdvContent.SelectedRowFirstKey);
            break;

        case "Remove":
            objResourceRule.DeleteResource(gdvContent.SelectedRowDataKeys);
            RenderPage();
            break;

        case "Modify":
            Redirect("../../ServiceLayer/Resource/ResourceEdit.aspx?ResourceTypeID=" + gdvContent.SelectedRowDataKeys);
            break;
        }
    }
Esempio n. 4
0
 public void SaveInfo()
 {
     if (fupFile.HasFile)
     {
         fupFile.Save();
     }
     else
     {
         MessageDialog("请选择要上传的文件");
         return;
     }
     Redirect("../../ServiceLayer/Resource/ResourceVerList.aspx?ResourceTypeID=" + ResourceTypeID.ToString() + "&ResourceID=" + ResourceID.ToString());
 }