|
@ -100,7 +100,7 @@ namespace SCP.BasicData |
|
|
protected void Button3_OnClick(object sender, EventArgs e) |
|
|
protected void Button3_OnClick(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
Int32 id = GetQueryIntValue("id"); |
|
|
Int32 id = GetQueryIntValue("id"); |
|
|
|
|
|
string mailVendIds = ""; |
|
|
if (id != -1) |
|
|
if (id != -1) |
|
|
{ |
|
|
{ |
|
|
User modelUsers = DB.Users.FirstOrDefault(p => p.Name == txtSupplierCode.SelectedValue); |
|
|
User modelUsers = DB.Users.FirstOrDefault(p => p.Name == txtSupplierCode.SelectedValue); |
|
@ -179,6 +179,7 @@ namespace SCP.BasicData |
|
|
{ |
|
|
{ |
|
|
model.SupplierCode = GetSupplierCodes("All"); |
|
|
model.SupplierCode = GetSupplierCodes("All"); |
|
|
model.SupplierName = GetSupplierNames("All"); |
|
|
model.SupplierName = GetSupplierNames("All"); |
|
|
|
|
|
mailVendIds = GetSupplierCodes_Mail("All"); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
@ -191,6 +192,7 @@ namespace SCP.BasicData |
|
|
|
|
|
|
|
|
model.SupplierCode = GetSupplierCodes("Some"); |
|
|
model.SupplierCode = GetSupplierCodes("Some"); |
|
|
model.SupplierName = GetSupplierNames("Some"); |
|
|
model.SupplierName = GetSupplierNames("Some"); |
|
|
|
|
|
mailVendIds = GetSupplierCodes_Mail("Some"); |
|
|
} |
|
|
} |
|
|
// model.FactoryCode=txt 用户登陆名字
|
|
|
// model.FactoryCode=txt 用户登陆名字
|
|
|
model.Content = txtContent.Text; |
|
|
model.Content = txtContent.Text; |
|
@ -209,6 +211,7 @@ namespace SCP.BasicData |
|
|
var ret = SCP_INFO_CONTROLLER.SaveInfo(model); |
|
|
var ret = SCP_INFO_CONTROLLER.SaveInfo(model); |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
|
|
|
SCP.Common.MailManager.SendMails(mailVendIds, "信息发布:" + model.Content, CurrentUser.FactoryList.FirstOrDefault()); |
|
|
Alert.ShowInParent("保存成功!"); |
|
|
Alert.ShowInParent("保存成功!"); |
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); |
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); |
|
|
|
|
|
|
|
@ -259,6 +262,41 @@ namespace SCP.BasicData |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
private string GetSupplierCodes_Mail(string type) |
|
|
|
|
|
{ |
|
|
|
|
|
string strResult = ""; |
|
|
|
|
|
|
|
|
|
|
|
if ("All".Equals(type)) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (FineUI.ListItem vender in txtSupplierCode.Items) |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(strResult)) |
|
|
|
|
|
{ |
|
|
|
|
|
strResult ="'"+ vender.Value+"'"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
strResult = strResult + "," + "'" + vender.Value + "'"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else if ("Some".Equals(type)) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (FineUI.ListItem item in txtSupplierCode.SelectedItemArray) |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(strResult)) |
|
|
|
|
|
{ |
|
|
|
|
|
strResult = "'" + item.Value + "'"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
strResult = strResult + "," + "'" + item.Value + "'"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return strResult; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private string GetSupplierCodes(string type) |
|
|
private string GetSupplierCodes(string type) |
|
|
{ |
|
|
{ |
|
|