diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo
index 791fda5..e1850e8 100644
Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_Params_Edit.aspx.cs b/HJGL/FineUIPro.Web/Email_Send/Email_Params_Edit.aspx.cs
index 47653d1..1ecf2fd 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_Params_Edit.aspx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_Params_Edit.aspx.cs
@@ -38,6 +38,7 @@ namespace FineUIPro.Web.Email_Send
string emailId = Request.Params["id"];
pops = BLL.Email_Send.Email_ParamsService.GetEmail_ParamsPop(emailId);
+
if (pops == null)
{
Email_Params pop = new Email_Params();
@@ -50,7 +51,7 @@ namespace FineUIPro.Web.Email_Send
BLL.Email_Send.Email_ParamsService.AddEmail_Params(pop);
//BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.SendEmailPopMenuId,, "Add Parameter information",);
- ShowNotify("Send Successfully!", MessageBoxIcon.Success);
+ ShowNotify("发送成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else {
@@ -61,7 +62,7 @@ namespace FineUIPro.Web.Email_Send
pops.UpdateTime = DateTime.Now;
BLL.Email_Send.Email_ParamsService.UpdateEmail_Params(pops);
//BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId,Const.menuId, "Update Parameter information");
- ShowNotify("Send Successfully!", MessageBoxIcon.Success);
+ ShowNotify("发送成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx b/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx
index e49c43c..7ae9523 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx
@@ -30,7 +30,7 @@
-
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx.cs b/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx.cs
index ccf6a84..285808a 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_Params_List.aspx.cs
@@ -72,7 +72,7 @@ namespace FineUIPro.Web.Email_Send
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
- Alert.ShowInParent("Please select at least one record!");
+ Alert.ShowInParent("请选择至少一条记录!");
return;
}
string Id = Grid1.SelectedRowID;
@@ -119,7 +119,7 @@ namespace FineUIPro.Web.Email_Send
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.Email_Send.Email_ParamsService.DeleteEmail_ParamsById(rowID);
- ShowNotify("Deleted successfully!");
+ ShowNotify("删除成功!");
}
BindGrid();
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_Pop_Edit.aspx.cs b/HJGL/FineUIPro.Web/Email_Send/Email_Pop_Edit.aspx.cs
index 592f88f..9e43890 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_Pop_Edit.aspx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_Pop_Edit.aspx.cs
@@ -49,7 +49,7 @@ namespace FineUIPro.Web.Email_Send
BLL.Email_Send.Email_PopService.UpdateEmail_Pop(pop);
//BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Update Email information");
- ShowNotify("Save Successfully!", MessageBoxIcon.Success);
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
}
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx.cs b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx.cs
index 11dad8b..10403c9 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_Edit.aspx.cs
@@ -238,7 +238,7 @@ namespace FineUIPro.Web.Email_Send
}
else
{
- ShowNotify("Cannot Be Created Repeatedly!", MessageBoxIcon.Error);
+ ShowNotify("不能重复创建!", MessageBoxIcon.Error);
return;
}
@@ -266,8 +266,8 @@ namespace FineUIPro.Web.Email_Send
tep.EmtempID = emailId;
tep.EmuserID = item.UserId.ToString();
tep.EMPeopleType = BLL.Const.SenderType;
- tep.EmuserName = item.UserName.ToString();
- tep.EmuaerEmailAddress = item.Email.ToString();
+ tep.EmuserName = item.UserName;
+ tep.EmuaerEmailAddress = item.Email;
tplist.Add(tep);
}
}
@@ -280,10 +280,10 @@ namespace FineUIPro.Web.Email_Send
Model.Email_ToPeople tep = new Model.Email_ToPeople();
tep.EmID = Guid.NewGuid().ToString();
tep.EmtempID = temp.EmailId;
- tep.EmuserID = item.UserId.ToString();
- tep.EmuserName = item.UserName.ToString();
+ tep.EmuserID = item.UserId;
+ tep.EmuserName = item.UserName;
tep.EMPeopleType = BLL.Const.CCType;
- tep.EmuaerEmailAddress = item.Email.ToString();
+ tep.EmuaerEmailAddress = item.Email;
tplist.Add(tep);
}
}
@@ -381,7 +381,7 @@ namespace FineUIPro.Web.Email_Send
}
else
{
- ShowNotify("Cannot Be Created Repeatedly!", MessageBoxIcon.Error);
+ ShowNotify("不能重复创建", MessageBoxIcon.Error);
return;
}
}
@@ -482,7 +482,7 @@ namespace FineUIPro.Web.Email_Send
//BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "Update SendEmailTemplate!");
}
}
- ShowNotify("Save Successfully!", MessageBoxIcon.Success);
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx
index 871b6ee..15ae2a0 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx
@@ -30,7 +30,7 @@
-
@@ -43,26 +43,26 @@
+ HeaderTextAlign="Left" TextAlign="Left" FieldType="String" HeaderText="邮件通知人">
+ HeaderTextAlign="Left" TextAlign="Left" HeaderText="邮件标题">
+ HeaderTextAlign="Left" TextAlign="Left" FieldType="String" HeaderText="发送条件">
+ HeaderTextAlign="Left" TextAlign="Left" HeaderText="邮件内容">
<%--
+ HeaderTextAlign="Left" TextAlign="Left" FieldType="String" HeaderText="EmailDesc" ExpandUnusedSpace="true">
--%>
+ HeaderTextAlign="Left" TextAlign="Center" EnableFilter="true">
@@ -107,7 +107,7 @@
Icon="BulletEdit" runat="server" Text="Modify" Hidden="true">
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx.cs b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx.cs
index 0c8e602..c9e4f26 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_SendTemplate_List.aspx.cs
@@ -73,7 +73,7 @@ namespace FineUIPro.Web.Email_Send
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
- Alert.ShowInParent("Please select at least one record!");
+ Alert.ShowInParent("请选择至少一条记录!");
return;
}
string Id = Grid1.SelectedRowID;
@@ -124,7 +124,7 @@ namespace FineUIPro.Web.Email_Send
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.Email_Send.Email_SendTemplateService.Delete(rowID);
- ShowNotify("Deleted successfully!");
+ ShowNotify("成功删除!");
}
BindGrid();
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx b/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx
index 08c1b31..8587f2d 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx
@@ -28,7 +28,7 @@
-
diff --git a/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx.cs b/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx.cs
index cf4545c..6c653f9 100644
--- a/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/Email_Send_Edit.aspx.cs
@@ -110,6 +110,7 @@ namespace FineUIPro.Web.Email_Send
Email_Pop pop = new Email_Pop();
pop = MailHelper.getEmailPop("7EC5E991-B7A0-495A-90ED-2BE15370C959");
+
string mailFrom = pop.EmailYx;
string[] mailTo = null;
@@ -129,6 +130,11 @@ namespace FineUIPro.Web.Email_Send
namelist.Add(tn.CommandName);
}
}
+ if (namelist.Count == 0)
+ {
+ ShowNotify("请至少选择一项用户进行发送!", MessageBoxIcon.Warning);
+ return;
+ }
mailTo = namelist.ToList().ToArray();
mailSubject = this.txtSendTitle.Text.Trim();
diff --git a/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx b/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx
index 001aaa5..d773e8a 100644
--- a/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx
+++ b/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx
@@ -7,10 +7,13 @@
-
+
+
-
+
@@ -24,10 +27,11 @@
OnSort="Grid1_Sort">
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.cs b/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.cs
index fbff4b8..d2e0d36 100644
--- a/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.cs
@@ -17,7 +17,8 @@ namespace FineUIPro.Web.Email_Send
{
if (!IsPostBack)
{
- BindGrid();
+ BindGrid("");
+ DataBindDrpUnit();
}
}
@@ -27,13 +28,13 @@ namespace FineUIPro.Web.Email_Send
#region BindGrid
- private void BindGrid()
+ private void BindGrid(string selectUnitId)
{
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount)
- Grid1.RecordCount = GetTotalCount();
+ Grid1.RecordCount = GetTotalCount(selectUnitId);
// 2.获取当前分页数据
- DataTable table = GetPagedDataTable();
+ DataTable table = GetPagedDataTable(selectUnitId);
// 3.绑定到Grid
Grid1.DataSource = table;
@@ -44,21 +45,30 @@ namespace FineUIPro.Web.Email_Send
/// 模拟返回总项数
///
///
- private int GetTotalCount()
+ private int GetTotalCount(string selectUnitId)
{
- return GetSource().Rows.Count;
+ return GetSource(selectUnitId).Rows.Count;
}
+ private void DataBindDrpUnit()
+ {
+ var data = Funs.DB.Base_Unit.ToList();
+ drpSearch.DataSource = data;
+ drpSearch.DataTextField = "UnitName";
+ drpSearch.DataValueField = "UnitId";
+ drpSearch.DataBind();
+ drpSearch.Items.Insert(0,new ListItem("请选择单位",""));
+ }
///
/// 模拟数据库分页(实际项目中请直接使用SQL语句返回分页数据!)
///
///
- private DataTable GetPagedDataTable()
+ private DataTable GetPagedDataTable(string selectUnitId)
{
int pageIndex = Grid1.PageIndex;
int pageSize = Grid1.PageSize;
- DataTable table = GetSource();
+ DataTable table = GetSource(selectUnitId);
DataTable paged = table.Clone();
int rowbegin = pageIndex * pageSize;
@@ -74,30 +84,36 @@ namespace FineUIPro.Web.Email_Send
return paged;
}
-
- private DataTable GetSource()
+ protected void drpSearch_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ string rowId = this.drpSearch.SelectedValue;
+ this.BindGrid(rowId);
+ }
+ private DataTable GetSource(string selectUnitId)
{
string sortField = Grid1.SortField;
string sortDirection = Grid1.SortDirection;
- string strSql = @"select UserId,UserName,Email from Sys_User where 1=1";
+ string strSql = @"select a.UserId,b.UnitId,b.UserName,c.UnitName from Project_User as a inner join Sys_User as b on a.UserId=b.UserId
+inner join Base_Unit as c on b.UnitId=c.UnitId where b.IsPost=1 order by c.UnitName ";
List listStr = new List();
SqlParameter[] parameter = listStr.ToArray();
DataTable table2 = SQLHelper.GetDataTableRunText(strSql, parameter);
-
DataView view2 = table2.DefaultView;
- view2.Sort = String.Format("{0} {1}", sortField, sortDirection);
-
+
List filters = new List();
string searchKeyword = ttbSearch.Text.Trim();
if (!String.IsNullOrEmpty(searchKeyword) && ttbSearch.ShowTrigger1)
{
// RowFilter的用法:http://www.csharp-examples.net/dataview-rowfilter/
- filters.Add(String.Format("UserName LIKE '*{0}*'", EscapeLikeValue(searchKeyword)));
+ filters.Add(String.Format("(UnitName LIKE '*{0}*' or UserName like '*{0}*')", EscapeLikeValue(searchKeyword)));
+ }
+ if (!string.IsNullOrEmpty(selectUnitId))
+ {
+ filters.Add(string.Format(" UnitId='{0}'", selectUnitId));
}
-
if (filters.Count > 0)
{
@@ -137,7 +153,7 @@ namespace FineUIPro.Web.Email_Send
{
//Grid1.PageIndex = e.NewPageIndex;
- BindGrid();
+ BindGrid(string.Empty); ;
}
protected void Grid1_Sort(object sender, GridSortEventArgs e)
@@ -145,7 +161,7 @@ namespace FineUIPro.Web.Email_Send
//Grid1.SortDirection = e.SortDirection;
//Grid1.SortField = e.SortField;
- BindGrid();
+ BindGrid(string.Empty);
}
@@ -154,14 +170,14 @@ namespace FineUIPro.Web.Email_Send
ttbSearch.Text = String.Empty;
ttbSearch.ShowTrigger1 = false;
- BindGrid();
+ BindGrid(string.Empty);
}
protected void ttbSearch_Trigger2Click(object sender, EventArgs e)
{
ttbSearch.ShowTrigger1 = true;
- BindGrid();
+ BindGrid(string.Empty);
}
diff --git a/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.designer.cs b/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.designer.cs
index ae1daf7..be1267b 100644
--- a/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.designer.cs
+++ b/HJGL/FineUIPro.Web/Email_Send/SelectUserControl.ascx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.Email_Send {
-
-
- public partial class SelectUserControl {
-
+namespace FineUIPro.Web.Email_Send
+{
+
+
+ public partial class SelectUserControl
+ {
+
///
/// Panel7 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.Email_Send {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel7;
-
+
///
/// Form5 控件。
///
@@ -29,7 +31,16 @@ namespace FineUIPro.Web.Email_Send {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form Form5;
-
+
+ ///
+ /// drpSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpSearch;
+
///
/// ttbSearch 控件。
///
@@ -38,7 +49,7 @@ namespace FineUIPro.Web.Email_Send {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TwinTriggerBox ttbSearch;
-
+
///
/// Grid1 控件。
///