dlmh_system/VRS/Management/App_Func_Dsc.aspx.cs

112 lines
3.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace VRS.Management
{
public partial class App_Func_Dsc : BasePage
{
DataService.BLL.pro_app bll = new DataService.BLL.pro_app();
DataService.BLL.admin_log log = new DataService.BLL.admin_log();
protected override void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//VerifyPermissions("10016");
//BindSystemRoles(dpRole);
DataLoad();
}
}
/// <summary>
/// 绑定科目
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void dp_major_SelectedIndexChanged(object sender, DropDownListEventArgs e)
{
//var value = dp_major.SelectedValue;
//BindMajorSubject(value, dp_subject, "");
}
protected void DataLoad()
{
string Id = Request.Params["Id"];
if (!string.IsNullOrWhiteSpace(Id))
{
var model = bll.GetModel(Id);
app_name.Text = model.app_name;
appid.Value = Id;
//soft_dsc.InnerHtml = model.soft_dsc;
soft_dsc.InnerHtml = model.soft_dsc;
yw_dsc.InnerHtml = model.yw_dsc;
func_dsc.InnerHtml = model.func_dsc;
var v1= HttpUtility.HtmlEncode(model.soft_dsc);
var v2 = HttpUtility.HtmlEncode(model.yw_dsc);
var v3 = HttpUtility.HtmlEncode(model.func_dsc);
//`soft_dsc` longtext '软件介绍',
//`yw_dsc` longtext '业务介绍',
//`func_dsc` longtext '功能介绍',
}
else
{
OnError(null);
}
}
protected void btnSure_Click(object sender, EventArgs e)
{
string Id = Request.Params["Id"];
/*
if (string.IsNullOrEmpty(real_name.Text))
{
RadAjaxManager1.Alert("姓名不能为空!");
return;
}
*/
/*
if (string.IsNullOrEmpty(app_name.Text) || string.IsNullOrEmpty(dp_major.SelectedValue) || string.IsNullOrEmpty(dp_subject.SelectedValue) || string.IsNullOrEmpty(dp_soft.SelectedValue))
{
RadAjaxManager1.Alert("应用名称、专业分类、科目分类、软件分类不能为空!");
return;
}
*/
DataService.Model.pro_app model = bll.GetModel(Id);
model.soft_dsc = soft_dsc.InnerHtml;
model.yw_dsc = yw_dsc.InnerHtml;
model.func_dsc = func_dsc.InnerHtml;
//`soft_dsc` longtext '软件介绍',
//`yw_dsc` longtext '业务介绍',
//`func_dsc` longtext '功能介绍',
if (bll.Update(model))
{
log.write_log("修改应用功能介绍成功。" + "名称:" + app_name.Text.Trim() + "ID" + model.id);
RadAjaxManager1.ResponseScripts.Add("alert('修改成功!');CloseAndRebind();");
}
else
RadAjaxManager1.Alert("修改失败!");
}
}
}