|
@@ -227,15 +227,15 @@ namespace MySystem.Controllers
|
|
return "ok";
|
|
return "ok";
|
|
}
|
|
}
|
|
|
|
|
|
- public string addmer(int id = 0)
|
|
|
|
|
|
+ public string addmer(string no = "")
|
|
{
|
|
{
|
|
- List<int> ids = new List<int>();
|
|
|
|
- ids.Add(7551);
|
|
|
|
|
|
+ List<string> ids = new List<string>();
|
|
|
|
+ ids.Add(no);
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
- foreach(int sid in ids)
|
|
|
|
|
|
+ foreach(string sid in ids)
|
|
{
|
|
{
|
|
- MerchantAddInfo add = db.MerchantAddInfo.FirstOrDefault(m => m.Id == sid) ?? new MerchantAddInfo();
|
|
|
|
- MerchantInfo mer = db.MerchantInfo.FirstOrDefault(m => m.Id == sid) ?? new MerchantInfo();
|
|
|
|
|
|
+ MerchantAddInfo add = db.MerchantAddInfo.FirstOrDefault(m => m.MchtNo == sid) ?? new MerchantAddInfo();
|
|
|
|
+ MerchantInfo mer = db.MerchantInfo.FirstOrDefault(m => m.Id == add.Id) ?? new MerchantInfo();
|
|
PosPushDataNewHelper.Bind(add, mer);
|
|
PosPushDataNewHelper.Bind(add, mer);
|
|
}
|
|
}
|
|
db.Dispose();
|
|
db.Dispose();
|