dlmh_system/VRS/Management/ComHistory_Add.aspx.cs

55 lines
1.8 KiB
C#
Raw 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 ComHistory_Add : BasePage
{
DataService.BLL.pro_com_history bll = new DataService.BLL.pro_com_history();
DataService.BLL.admin_log log = new DataService.BLL.admin_log();
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
if (!IsPostBack)
{
BindYears(dp_yearInfo);
}
}
protected void btnSure_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(head.Text.Trim()))
{
RadAjaxManager1.Alert("标题不能为空!");
return;
}
/*
if (bll.GetRecordCount(string.Format(" soft_name = '{0}' ", name.Text.Trim())) > 0)
{
RadAjaxManager1.Alert("类型名称禁止重复!");
return;
}
*/
DataService.Model.pro_com_history model = new DataService.Model.pro_com_history();
model.id = BasePage.GetId();
model.year_info = dp_yearInfo.SelectedValue;
model.head = head.Text.Trim();
model.dsc = dsc_content.Text.Trim();
model.create_time = DateTime.Now;
if (bll.Add(model))
{
log.write_log("添加公司历程成功。" + "名称:" + model.head + "ID" + model.id);
RadAjaxManager1.ResponseScripts.Add("alert('添加成功!');CloseAndRebind();");
}
else
{
RadAjaxManager1.Alert("添加失败!");
}
}
}
}