dlmh_system/VRS/Management/Major_Subject_Add.aspx.cs

61 lines
1.9 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.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace VRS.Management
{
public partial class Major_Subject_Add : BasePage
{
DataService.BLL.admin_log log = new DataService.BLL.admin_log();
DataService.BLL.admin_subject bll = new DataService.BLL.admin_subject();
DataService.BLL.admin_major bll_task_proc = new DataService.BLL.admin_major();
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
if (!IsPostBack)
{
}
}
protected void btnSure_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(name.Text))
{
RadAjaxManager1.Alert("专业名称不能为空!");
return;
}
/*
if (bll.GetRecordCount(string.Format(" device_name = '{0}' ", device_name.Text.Trim())) > 0)
{
RadAjaxManager1.Alert("设备名称禁止重复!");
return;
}
*/
string Id = Request.Params["Id"];
//var proc = bll_task_proc.GetModel(Id);
var model = new DataService.Model.admin_subject();
model.subject_id = BasePage.GetId();
model.major_id = Id;
model.subject_name = name.Text.Trim();
if (bll.Add(model))
{
log.write_log("添加专业分类成功。" + "名称:" + name.Text.Trim() + "ID" + model.subject_id);
RadAjaxManager1.ResponseScripts.Add("alert('添加成功!');CloseAndRebind();");
}
else
{
RadAjaxManager1.Alert("添加失败!");
}
}
}
}