public ActionResult Reject(List <int> ID, List <int> CateLV1, List <int> CateLV2, List <int> CateLV3, string Remark) { var svBuylead = new BuyleadService(); try { svBuylead.RejectBuylead(ID, CateLV1, CateLV2, CateLV3, Remark, LogonCompCode); if (svBuylead.IsResult) { for (var i = 0; i < ID.Count(); i++) { var Buylead = svBuylead.SelectData <b2bBuylead>("BuyleadID, BuyleadCode, BuyleadName, BuyleadCompanyName, BuyleadContactPerson, BuyleadEmail, RowFlag, Remark", "BuyleadID = N'" + ID[i] + "'"); if (Buylead.Count > 0) { var model = Buylead.First(); SendEmailApproveBuylead(model); } } } } catch (Exception ex) { CreateLogFiles(ex); } return(Json(new { IsResult = svBuylead.IsResult, MsgError = "" })); }