ERP反馈信息管理(十九)
前台显示的界面:
<%@ 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反馈信息管理(十九)的更多相关文章
- Gradle 1.12翻译——第十九章. Gradle 守护进程
有关其他已翻译的章节请关注Github上的项目:https://github.com/msdx/gradledoc/tree/1.12,或访问:http://gradledoc.qiniudn.com ...
- WPF,Silverlight与XAML读书笔记第三十九 - 可视化效果之3D图形
原文:WPF,Silverlight与XAML读书笔记第三十九 - 可视化效果之3D图形 说明:本系列基本上是<WPF揭秘>的读书笔记.在结构安排与文章内容上参照<WPF揭秘> ...
- 我是如何一步步编码完成万仓网ERP系统的(九)产品库设计 5.产品属性项
https://www.cnblogs.com/smh188/p/11533668.html(我是如何一步步编码完成万仓网ERP系统的(一)系统架构) https://www.cnblogs.com/ ...
- abp(net core)+easyui+efcore实现仓储管理系统——出库管理之一(四十九)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- 无废话ExtJs 入门教程十九[API的使用]
无废话ExtJs 入门教程十九[API的使用] extjs技术交流,欢迎加群(201926085) 首先解释什么是 API 来自百度百科的官方解释:API(Application Programmin ...
- Python之路【第十九章】:Django进阶
Django路由规则 1.基于正则的URL 在templates目录下创建index.html.detail.html文件 <!DOCTYPE html> <html lang=&q ...
- Bootstrap <基础二十九>面板(Panels)
Bootstrap 面板(Panels).面板组件用于把 DOM 组件插入到一个盒子中.创建一个基本的面板,只需要向 <div> 元素添加 class .panel 和 class .pa ...
- Bootstrap <基础十九>分页
Bootstrap 支持的分页特性.分页(Pagination),是一种无序列表,Bootstrap 像处理其他界面元素一样处理分页. 分页(Pagination) 下表列出了 Bootstrap 提 ...
- Web 开发人员和设计师必读文章推荐【系列二十九】
<Web 前端开发精华文章推荐>2014年第8期(总第29期)和大家见面了.梦想天空博客关注 前端开发 技术,分享各类能够提升网站用户体验的优秀 jQuery 插件,展示前沿的 HTML5 ...
随机推荐
- (31)odoo中的时间
* 在model中 from datetime import datetime, timedelta import time from openerp.tools impor ...
- struts2 拦截器的注册在strut.xml中
根据需要:需要在struts.xml中注册拦截器为以下内容 根据自己的业务需要更改参数 <!DOCTYPE struts PUBLIC "-//Apache Software Fou ...
- JAVA 数组作业——动手动脑以及课后实验性问题
JAVA课后作业——动手动脑 一:阅读并运行示例PassArray.java,观察并分析程序输出的结果,小结,然后与下页幻灯片所讲的内容进行对照. 1.源代码 // PassArray.java // ...
- mysql的小知识点(关于数据库的导入导出 对于windows)
对于,一个存在的数据,我们该如何去打包成.sql属性的文件呢? 直接进行这两条语句: D:\Program Files\MySQL\mysql\bin>mysqldump -u root -p ...
- hdu----(1257)最少拦截系统(dp/LIS)
最少拦截系统 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- MATLAB画图
画图代码 clear % http://www.peteryu.ca/tutorials/matlab/visualize_decision_boundaries % load RankData % ...
- 告别node-forever,拥抱PM2
告别node-forever,拥抱PM2 返回原文英文原文:Goodbye node-forever,hello PM2 devo.ps团队对JavaScript的迷恋已经不是什么秘密了;node.j ...
- hdu5412(动态区间第k大)
CRB and Queries Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Other ...
- php 大数据量及海量数据处理算法总结
下面的方法是我对海量数据的处理方法进行了一个一般性的总结,当然这些方法可能并不能完全覆盖所有的问题,但是这样的一些方法也基本可以处理绝大多数遇到的问题.下面的一些问题基本直接来源于公司的面试笔试题目, ...
- <构建之法>之第一二三章的感悟
第一章 看了第一章,第一章主要是概论,主要讲述软件是什么,是由什么组成的,然后接着陈述软件工程是什么,看了第一章之后,得知,软件工程只是实现软件的一个工具,有了工具做事情才容易.还有进行运维和维护软件 ...