温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:客户关系管理系统源码
当前文件:
myCRM/controls/AddLinkRecord.ascx.cs[1K,2009-6-12 11:48:09],打开代码结构图
myCRM/controls/AddLinkRecord.ascx.cs[1K,2009-6-12 11:48:09],打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
12
public partial class controls_AddLinkRecord : System.Web.UI.UserControl 13
{ 14
protected void Page_Load(object sender, EventArgs e) 15
{ 16
17
} 18
protected void Button1_Click(object sender, EventArgs e) 19
{ 20
//初始化联系记录实体,并赋值。 21
LinkRecordEntity record = new LinkRecordEntity(); 22
record.Name = txtname.Text; 23
record.UserName = txtusername.Text; 24
record.Note = txtnote.Text; 25
//判断日期是否选择,如果未选择,使用默认日期 26
if(Calendar1.SelectedDate.Year !=1) 27
record.LinkDate = Calendar1.SelectedDate; 28
//调用实体的添加方法 29
LinkRecordDA myda = new LinkRecordDA(); 30
bool result=myda.InsertLinkRecord(record); 31
if (result) 32
Label1.Text = "添加成功"; 33
} 34
} 35






}
}