前台显示的界面:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerFeedback.aspx.cs"
Inherits="BioErpWeb.CRMSystem.CustomerFeedback" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" />
<link href="../Styles/CalenderStyle.css" rel="stylesheet" type="text/css" />
<script src="../JS/CustomerName.js" type="text/javascript"></script>
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="../Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="../Scripts/ValidateMessage_ZW.js" type="text/javascript"></script>
<script src="../Scripts/cld.js" type="text/javascript"></script>
<style type="text/css">
.style1
{
height: 22px;
}
</style> <script type="text/javascript">
$().ready(function () {
$("#form1").validate();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="maintable">
<tr>
<td colspan="2" class="titlebar">
客户反馈信息记录
</td>
</tr>
<tr>
<td class="style1">
主题</td>
<td class="style1">
<asp:TextBox ID="txtSubJect" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style1">
反馈客户
</td>
<td class="style1">
<asp:TextBox ID="txtCustomerID" CssClass="required number" runat="server" OnTextChanged="txtCustomerID_TextChanged"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="选择客户" CausesValidation="false" UseSubmitBehavior="false" OnClientClick="showCustomerDialog()" />
</td>
</tr>
<tr>
<td class="style1">
反馈人</td>
<td class="style1">
<asp:DropDownList ID="ddlLinkMan" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
调查时间
</td>
<td>
<asp:TextBox ID="txtInvestigateTime" CssClass="required" onfocus="setday(this);" onclick="setday(this);" runat="server"></asp:TextBox> </td>
</tr>
<tr>
<td>
回复时间</td>
<td>
<asp:TextBox ID="txtRevertTime" onfocus="setday(this);" onclick="setday(this);" CssClass="required" runat="server"></asp:TextBox> </td>
</tr>
<tr>
<td>
反馈类型
</td>
<td>
<asp:DropDownList ID="ddlMethod" runat="server">
<asp:ListItem>电话</asp:ListItem>
<asp:ListItem>短信</asp:ListItem>
<asp:ListItem>Email</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
备注
</td>
<td>
<asp:TextBox ID="txtRemark" Width="552px" Height="101px" CssClass="required" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" class="bottomtd">
<asp:Button ID="btnSubmit" runat="server" Text="客户反馈信息记录" OnClick="btnSubmit_Click" />
<asp:Button ID="btnReturn" runat="server" Text="返回列表" OnClick="btnReturn_Click" />
</td>
</tr>
</table>
<br />
</div>
</form>
</body>
</html>

存储过程(添加):

ALTER PROCEDURE [dbo].[BioCrmCustomerFeedback_ADD]
@Subject nvarchar(100),
@UserID int,
@CustomerID int,
@LinkmanID int,
@FeedbackType nvarchar(100),
@InvestigateTime datetime,
@RevertTime datetime,
@Remark nvarchar(200)
AS
INSERT INTO [BioCrmCustomerFeedback](
[Subject],[UserID],[CustomerID],[LinkmanID],[FeedbackType],[InvestigateTime],[RevertTime],[Remark]
)VALUES(
@Subject,@UserID,@CustomerID,@LinkmanID,@FeedbackType,@InvestigateTime,@RevertTime,@Remark
)

修改的存储过程:

ALTER PROCEDURE [dbo].[BioCrmCustomerFeedback_Update]
@FeedbackID int,
@Subject nvarchar(100),
@UserID int,
@CustomerID int,
@LinkmanID int,
@FeedbackType nvarchar(100),
@InvestigateTime datetime,
@RevertTime datetime,
@Remark nvarchar(200),
@DeleteState bit
AS
UPDATE [BioCrmCustomerFeedback] SET
[Subject] = @Subject,[UserID] = @UserID,[CustomerID] = @CustomerID,[LinkmanID] = @LinkmanID,[FeedbackType]
= @FeedbackType,[InvestigateTime] = @InvestigateTime,[RevertTime] = @RevertTime,[Remark] = @Remark,[DeleteState] = @DeleteState
WHERE FeedbackID=@FeedbackID

添加的后台代码:

  protected void Page_Load(object sender, EventArgs e)
{ Session["Userid"] = "29";
if (Session["Userid"] == null)
{
Response.Redirect("~/Web/Desk.aspx");
} } protected void btnSubmit_Click(object sender, EventArgs e)
{
BioCrmCustomerFeedback feedback = new BioCrmCustomerFeedback()
{
Subject=this.txtSubJect.Text,
UserID = int.Parse(Session["Userid"].ToString()),
RevertTime= Convert.ToDateTime(this.txtRevertTime.Text),
Remark=this.txtRemark.Text,
LinkmanID= int.Parse(ddlLinkMan.SelectedValue.ToString()),
CustomerID=int.Parse(this.txtCustomerID.Text),
FeedbackType=this.ddlMethod.SelectedItem.Text,
InvestigateTime=Convert.ToDateTime(this.txtInvestigateTime.Text) };
BioCrmCustomerFeedbackBLL feedbackbll = new BioCrmCustomerFeedbackBLL();
if (feedbackbll.BioCrmCustomerFeedbackAdd(feedback) != 0)
{
ClientScript.RegisterStartupScript(this.GetType(), "test", "alert('反馈记录保存成功')", true);
}
}

定义一个查询视图:

SELECT   dbo.BioCrmCustomerFeedback.FeedbackID, dbo.BioCrmCustomerFeedback.Subject,
dbo.BioCrmCustomerFeedback.UserID, dbo.BioCrmCustomerFeedback.CustomerID,
dbo.BioCrmCustomerFeedback.LinkmanID, dbo.BioCrmCustomerFeedback.FeedbackType,
dbo.BioCrmCustomerFeedback.InvestigateTime, dbo.BioCrmCustomerFeedback.RevertTime,
dbo.BioCrmCustomerFeedback.Remark, dbo.BioCrmCustomerFeedback.DeleteState,
dbo.BioCrmCustomer.CustomerName, dbo.BioCrmLinkmanInfo.LinkmanName, dbo.UserManager.UserName
FROM dbo.BioCrmCustomerFeedback INNER JOIN
dbo.BioCrmCustomer ON dbo.BioCrmCustomerFeedback.CustomerID = dbo.BioCrmCustomer.CustomerID INNER JOIN
dbo.BioCrmLinkmanInfo ON dbo.BioCrmCustomerFeedback.LinkmanID = dbo.BioCrmLinkmanInfo.LinkmanID INNER JOIN
dbo.UserManager ON dbo.BioCrmCustomerFeedback.UserID = dbo.UserManager.UserId

显示的界面:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerFeedbackList.aspx.cs" Inherits="BioErpWeb.CRMSystem.CustomerFeedbackList" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

<%@ Register src="../UserControl/CRMMenuBar.ascx" tagname="CRMMenuBar" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" />
<link href="../Styles/AspNetPagerStyle.css" rel="stylesheet" type="text/css" />
<style type="text/css">
td{ text-align:center;}
.tdsearch{ line-height:30px;}
.menubar{ background:url(../Web/images/block_hd_bg.png); height:25px; width:100%;}
.menubar ul{ margin:0px; padding:0px; list-style:none;}
.menubar ul li{ display:inline; line-height:25px;}
.menubar ul li a{display:inline-block; text-align:center; width:100px; color:#0066CC; text-decoration:none;} </style>
<script src="../JS/CustomerName.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager> <uc1:CRMMenuBar ID="CRMMenuBar1" runat="server" /> </div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div>
<table class="maintable" style=" width:900px;">
<tr>
<td colspan="4" class="titlebar">
<span>客户反馈记录信息管理</span>
</td>
</tr>
<tr>
<td class="tdsearch">
<asp:Label ID="Label2" runat="server" Text="客户名:"></asp:Label>
<asp:TextBox ID="txtCustomerID" runat="server"></asp:TextBox>
<input ID="Button1" value="选择客户" type="button" Width="60px" onclick="showCustomerDialog()" />
</td>
<td class="tdsearch">
<asp:Label ID="Label1" runat="server" Text="联系人姓名:"></asp:Label>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox> </td>
<td class="tdsearch">
<asp:Label ID="Label3" runat="server" Text="联系时间"></asp:Label>
<asp:TextBox ID="txtContactTime" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="txtContactTime" Format="yyyy-MM-dd" runat="server">
</cc1:CalendarExtender> </td> <td class="tdsearch">
<asp:ImageButton ID="imgbutnSearch" Width="60" Height="22" runat="server"
ImageUrl="~/Web/images/Btnsearch.gif" onclick="imgbutnSearch_Click" /> 
<asp:ImageButton ID="imgbtnNew" runat="server" Width="60" Height="22"
ImageUrl="~/Web/images/btnadd.gif" onclick="imgbtnNew_Click"/>
</td>
</tr>
<tr>
<td colspan="4" class="bottomtd">
<asp:GridView ID="GridView1" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="FeedbackID">
<Columns>
<asp:TemplateField HeaderText="记录编号" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Eval("FeedbackID") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="主题" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Eval("Subject") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="120px" HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="反馈客户(公司)" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("CustomerName") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="反馈人" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("LinkmanName") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="反馈方式" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label9" runat="server" Text='<%# Eval("FeedbackType") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="调查时间" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label7" runat="server" Text='<%# Convert.ToDateTime(Eval("InvestigateTime")).ToString("yyyy-MM-dd") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField> <asp:TemplateField HeaderText="回复时间" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lbreverttime" runat="server" Text='<%# Convert.ToDateTime(Eval("RevertTime")).ToString("yyyy-MM-dd") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField> <asp:TemplateField HeaderText="调查员工" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label10" runat="server" Text='<%#Eval("UserName") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="反馈备注" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lbremark" runat="server" Text='<%#Eval("Remark").ToString().Length>5?Eval("Remark").ToString().Substring(0,5)+"…":Eval("Remark").ToString() %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="FeedbackID"
DataNavigateUrlFormatString="ContactRecordUpdate.aspx?ID={0}" HeaderText="操作"
Text="查看并修改">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:HyperLinkField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="4">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb"
onpagechanged="AspNetPager1_PageChanged">
</webdiyer:AspNetPager>
</td>
</tr> </table> </div> </ContentTemplate>
</asp:UpdatePanel> </form>
</body>
</html>

查询的代码:

  public static int pageindex = 0;
public static int pagesize = 10;
public static string condition = ""; protected void Page_Load(object sender, EventArgs e)
{ if (!IsPostBack)
{ getallPageList();
}
} /// <summary>
/// 查询所有联系人信息
/// </summary>
private void getallPageList()
{
this.AspNetPager1.RecordCount = SqlComm.getDataCountByCondition("dbo.View_CrmCustomerFeedback", condition);
this.AspNetPager1.PageSize = pagesize;
this.GridView1.DataSource = SqlComm.getDataByPageIndex("dbo.View_CrmCustomerFeedback", "*", "FeedbackID", condition, pageindex, pagesize);
this.GridView1.DataBind();
} protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
pageindex = this.AspNetPager1.CurrentPageIndex - 1;
getallPageList();
} protected void imgbutnSearch_Click(object sender, ImageClickEventArgs e)
{
pageindex = 0;
condition = ""; getallPageList();
}

修改的BLL层:

  /// <summary>
/// 修改业务
/// </summary>
/// <param name="model">BioCrmCustomerFeedback</param>
/// <returns>int</returns>
public int BioCrmCustomerFeedbackUpdate(BioCrmCustomerFeedback model)
{
SqlParameter[] parameters = {
new SqlParameter("@FeedbackID", SqlDbType.Int,4),
new SqlParameter("@Subject", SqlDbType.NVarChar,100),
new SqlParameter("@UserID", SqlDbType.Int,4),
new SqlParameter("@CustomerID", SqlDbType.Int,4),
new SqlParameter("@LinkmanID", SqlDbType.Int,4),
new SqlParameter("@FeedbackType", SqlDbType.NVarChar,100),
new SqlParameter("@InvestigateTime", SqlDbType.DateTime),
new SqlParameter("@RevertTime", SqlDbType.DateTime),
new SqlParameter("@Remark", SqlDbType.NVarChar,200),
new SqlParameter("@DeleteState", SqlDbType.Bit,1)};
parameters[0].Value = model.FeedbackID;
parameters[1].Value = model.Subject;
parameters[2].Value = model.UserID;
parameters[3].Value = model.CustomerID;
parameters[4].Value = model.LinkmanID;
parameters[5].Value = model.FeedbackType;
parameters[6].Value = model.InvestigateTime;
parameters[7].Value = model.RevertTime;
parameters[8].Value = model.Remark;
parameters[9].Value = model.DeleteState;
return DataBaseHelper.ExcuteSqlReturnInt("BioCrmCustomerFeedback_Update", CommandType.StoredProcedure, parameters); }

修改的界面:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerFeedbackEdit.aspx.cs"
Inherits="BioErpWeb.CRMSystem.CustomerFeedbackEdit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" />
<link href="../Styles/CalenderStyle.css" rel="stylesheet" type="text/css" />
<script src="../JS/CustomerName.js" type="text/javascript"></script>
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="../Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="../Scripts/ValidateMessage_ZW.js" type="text/javascript"></script>
<script src="../Scripts/cld.js" type="text/javascript"></script>
<style type="text/css">
.style1
{
height: 22px;
}
</style> <script type="text/javascript">
$().ready(function () {
$("#form1").validate();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="maintable">
<tr>
<td colspan="2" class="titlebar">
客户反馈信息记录
</td>
</tr>
<tr>
<td class="style1">
主题</td>
<td class="style1">
<asp:TextBox ID="txtSubJect" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style1">
反馈客户
</td>
<td class="style1">
<asp:TextBox ID="txtCustomerID" CssClass="required number" runat="server" OnTextChanged="txtCustomerID_TextChanged"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="选择客户" CausesValidation="false" UseSubmitBehavior="false" OnClientClick="showCustomerDialog()" />
</td>
</tr>
<tr>
<td class="style1">
反馈人</td>
<td class="style1">
<asp:DropDownList ID="ddlLinkMan" runat="server">
</asp:DropDownList>
<asp:HyperLink ID="HyperLink1" NavigateUrl="~/CRMSystem/LinkManAdd.aspx" runat="server">添加联系人</asp:HyperLink>
</td>
</tr>
<tr>
<td>
调查人</td>
<td>
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
<asp:Button ID="btn" runat="server" Text="选择员工" OnClientClick="showDialog()" UseSubmitBehavior="false"/> </td>
</tr>
<tr>
<td>
调查时间
</td>
<td>
<asp:TextBox ID="txtInvestigateTime" CssClass="required" onfocus="setday(this);" onclick="setday(this);" runat="server"></asp:TextBox> </td>
</tr>
<tr>
<td>
回复时间</td>
<td>
<asp:TextBox ID="txtRevertTime" onfocus="setday(this);" onclick="setday(this);" CssClass="required" runat="server"></asp:TextBox> </td>
</tr>
<tr>
<td>
反馈类型
</td>
<td>
<asp:DropDownList ID="ddlMethod" runat="server">
<asp:ListItem>电话</asp:ListItem>
<asp:ListItem>短信</asp:ListItem>
<asp:ListItem>Email</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
备注
</td>
<td>
<asp:TextBox ID="txtRemark" Width="552px" Height="101px" CssClass="required" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
删除状态</td>
<td>
<asp:CheckBox ID="cbDelete" Text="是" runat="server" />
</td>
</tr>
<tr>
<td colspan="2" class="bottomtd">
<asp:Button ID="btnSubmit" runat="server" Text="客户反馈信息记录保存" OnClick="btnSubmit_Click" />
<asp:Button ID="btnReturn" runat="server" Text="返回列表" OnClick="btnReturn_Click" UseSubmitBehavior="false" />
</td>
</tr>
</table>
<br />
</div>
</form>
</body>
</html>

后台修改的代码:

 public partial class CustomerFeedbackEdit: System.Web.UI.Page
{ protected void Page_Load(object sender, EventArgs e)
{ Session["Userid"] = "29";
if (Session["Userid"] == null)
{
Response.Redirect("~/Web/Desk.aspx");
}
if (!IsPostBack)
{
getpageInfobind();
} } /// <summary>
/// 绑定页面基本信息
/// </summary>
private void getpageInfobind()
{
if (Request.QueryString["ID"] == null)
{
Response.Redirect("CustomerFeedbackList.aspx");
return;
} string id=Request.QueryString["ID"].ToString(); System.Data.SqlClient.SqlDataReader reader= SqlComm.GetDataReaderByCondition("BioCrmCustomerFeedback", "*", " FeedbackID=" + id); while (reader.Read())
{
this.txtSubJect.Text = reader["Subject"].ToString();
this.txtRevertTime.Text = reader["RevertTime"].ToString();
this.txtRemark.Text = reader["Remark"].ToString();
this.txtInvestigateTime.Text = reader["InvestigateTime"].ToString();
this.txtCustomerID.Text = reader["CustomerID"].ToString();
//绑定反馈信息的联系人
ddlLinkManband(reader["LinkmanID"].ToString());
this.ddlMethod.SelectedItem.Text = reader["FeedbackType"].ToString();
this.cbDelete.Checked =Convert.ToBoolean( reader["DeleteState"].ToString());
this.txtUserName.Text = reader["UserID"].ToString();
} } /// <summary>
/// 绑定反馈信息的联系人
/// </summary>
/// <param name="linkmanid"></param>
private void ddlLinkManband(string linkmanid)
{
ddlLinkMan.DataSource = SqlComm.GetDataByCondition("BioCrmLinkmanInfo","LinkmanID,LinkmanName"," LinkmanID="+linkmanid);
ddlLinkMan.DataTextField = "LinkmanName";
ddlLinkMan.DataValueField = "LinkmanID";
ddlLinkMan.DataBind();
ddlLinkMan.SelectedValue = linkmanid;
} protected void btnSubmit_Click(object sender, EventArgs e)
{
BioCrmCustomerFeedback feedback = new BioCrmCustomerFeedback()
{
FeedbackID=int.Parse(Request.QueryString["ID"].ToString()),
Subject=this.txtSubJect.Text,
UserID = int.Parse(Session["Userid"].ToString()),
RevertTime= Convert.ToDateTime(this.txtRevertTime.Text),
Remark=this.txtRemark.Text,
LinkmanID= int.Parse(ddlLinkMan.SelectedValue.ToString()),
CustomerID=int.Parse(this.txtCustomerID.Text),
FeedbackType=this.ddlMethod.SelectedItem.Text,
InvestigateTime=Convert.ToDateTime(this.txtInvestigateTime.Text),
DeleteState=cbDelete.Checked };
BioCrmCustomerFeedbackBLL feedbackbll = new BioCrmCustomerFeedbackBLL();
if (feedbackbll.BioCrmCustomerFeedbackUpdate(feedback) != 0)
{
Response.Redirect("CustomerFeedbackList.aspx");
} } protected void btnReturn_Click(object sender, EventArgs e)
{
Server.Transfer("CustomerFeedbackList.aspx");
} protected void txtCustomerID_TextChanged(object sender, EventArgs e)
{
if(txtCustomerID.Text.Trim()!="" && txtCustomerID.Text.Trim().Length!=0&&txtCustomerID.Text.Trim()!="请选择")
{
string id=this.txtCustomerID.Text;
System.Data.DataTable dt = SqlComm.GetDataByCondition("BioCrmLinkmanInfo", "LinkmanID,LinkmanName", "CustomerID=" + id).Tables[0];
if (dt.Rows.Count > 0)
{
this.ddlLinkMan.DataSource = dt;
this.ddlLinkMan.DataTextField = "LinkmanName";
this.ddlLinkMan.DataValueField = "LinkmanID";
this.ddlLinkMan.DataBind();
}
else
{
this.ddlLinkMan.Items.Clear();
this.ddlLinkMan.Items.Add(new ListItem("--请选择--", "0"));
}
}
}
}

查询拼结的代码:

   protected void imgbutnSearch_Click(object sender, ImageClickEventArgs e)
{
pageindex = 0;
condition = "";
if (this.txtSubject.Text.Trim() != null && this.txtSubject.Text.Trim().Length != 0)
{
condition = condition + " and Subject like '" + txtSubject.Text + "%'";
} if (this.txtCustomerID.Text.Trim() != null && this.txtCustomerID.Text.Trim().Length != 0)
{
condition = condition + " and CustomerID ='" + this.txtCustomerID.Text + "'";
} if (this.txts.Text != "" && this.txtend.Text != "")
{
condition = condition + " and (InvestigateTime >='" + this.txts.Text + "' and InvestigateTime<'" + this.txtend.Text + "')";
}
getallPageList();
}

自已定义js验证的扩展方法:

jQuery.extend(
jQuery.validator.messages, {
required: "必选字段",
remote: "请修正该字段",
email: "请输入正确格式的电子邮件",
url: "请输入合法的网址",
date: "请输入合法的日期",
dateISO: "请输入合法的日期 (如:2011-11-02).",
number: "请输入合法的数字",
digits: "只能输入整数",
creditcard: "请输入合法的信用卡号",
equalTo: "请再次输入相同的值",
accept: "请输入拥有合法后缀名的字符串",
maxlength: $.validator.format("请输入一个长度最多是 {0} 的字符串"),
minlength: $.validator.format("请输入一个长度最少是 {0} 的字符串"),
rangelength: $.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"),
range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
max: $.validator.format("请输入一个最大为 {0} 的值"),
min: $.validator.format("请输入一个最小为 {0} 的值")
});

ERP反馈信息管理(十九)的更多相关文章

  1. Gradle 1.12翻译——第十九章. Gradle 守护进程

    有关其他已翻译的章节请关注Github上的项目:https://github.com/msdx/gradledoc/tree/1.12,或访问:http://gradledoc.qiniudn.com ...

  2. WPF,Silverlight与XAML读书笔记第三十九 - 可视化效果之3D图形

    原文:WPF,Silverlight与XAML读书笔记第三十九 - 可视化效果之3D图形 说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘> ...

  3. 我是如何一步步编码完成万仓网ERP系统的(九)产品库设计 5.产品属性项

    https://www.cnblogs.com/smh188/p/11533668.html(我是如何一步步编码完成万仓网ERP系统的(一)系统架构) https://www.cnblogs.com/ ...

  4. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之一(四十九)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

  5. 无废话ExtJs 入门教程十九[API的使用]

    无废话ExtJs 入门教程十九[API的使用] extjs技术交流,欢迎加群(201926085) 首先解释什么是 API 来自百度百科的官方解释:API(Application Programmin ...

  6. Python之路【第十九章】:Django进阶

    Django路由规则 1.基于正则的URL 在templates目录下创建index.html.detail.html文件 <!DOCTYPE html> <html lang=&q ...

  7. Bootstrap <基础二十九>面板(Panels)

    Bootstrap 面板(Panels).面板组件用于把 DOM 组件插入到一个盒子中.创建一个基本的面板,只需要向 <div> 元素添加 class .panel 和 class .pa ...

  8. Bootstrap <基础十九>分页

    Bootstrap 支持的分页特性.分页(Pagination),是一种无序列表,Bootstrap 像处理其他界面元素一样处理分页. 分页(Pagination) 下表列出了 Bootstrap 提 ...

  9. Web 开发人员和设计师必读文章推荐【系列二十九】

    <Web 前端开发精华文章推荐>2014年第8期(总第29期)和大家见面了.梦想天空博客关注 前端开发 技术,分享各类能够提升网站用户体验的优秀 jQuery 插件,展示前沿的 HTML5 ...

随机推荐

  1. python中range和xrange的区别

    1.range生成一个列表:xrange生成一个生成器 2.用法都差不多  

  2. JS禁止右键

    function cancelMouse(){return false;}document.oncontextmenu = cancelMouse;

  3. 给文本标签UILabel添加长按复制功能

    http://www.111cn.net/sj/iOS/104236.htm http://blog.csdn.net/lrenjun/article/details/12582927 自定义一个可复 ...

  4. SAP 快速报表

    快速报表,这个名字不知道是不是第一个用,不过以这种方式做的报表,速度确实挺快的,应该比QUERY快,还简单 T-CODE:SQVI 进入界面后,输入一个报表名称,点击新建,这时候可以选择,单表查询,链 ...

  5. nssm在windows服务器上部署nodejs,coffee启动方式

    本想用forever / pm2 来部署nodejs, 百度后发现只能在Linux系统上使用,window上没法使用,兜一圈后又转nssm了.... 在Linux上,可以轻松的使用forever或者p ...

  6. uva 10723

      10723 - Cyborg Genes Time limit: 3.000 seconds Problem F Cyborg Genes Time Limit 1 Second Septembe ...

  7. redhat enterprixe 5.0 web 服务配置与管理

    一.Web服务及工作原理 Web服务的实现采用客户/服务器模型.客户机运行Web客户程序(浏览器),作用是解释和显示Web页面,相应用户的输入请求,并且通过http协议将用户请求传递给Web服务器.W ...

  8. @property和@synthesize的特性

    基础回顾:get方法和set方法 定义类成员变量时,可以在@interface中定义,也可以在@implementation中定义: 在@interface中声明,成员变量的状态是受保护的,即“@pr ...

  9. java之通过反射,来获得某对象的所有方法(类方法提取器)

    参考Thinging in Java 在编程时, 如果不记得一个类是否有某个方法,或者不知道一个类究竟能做些什么,而又不想通过索引或 类的层次结构去查找jdk文档,这时通过反射的小工具能节省很多时间. ...

  10. 使用System.Timers.Timer类实现程序定时执行

    使用System.Timers.Timer类实现程序定时执行 在C#里关于定时器类有3个:System.Windows.Forms.Timer类.System.Threading.Timer类和Sys ...