public ActionResult AddFavSupplier(List <int> SupID) { var svFavCompany = new FavCompanyService(); b2bFavCompany model = new b2bFavCompany(); try { #region Set svFavcompany Model foreach (var Sup in SupID) { var IsResult = svFavCompany.InsertFavCompany(Sup, LogonCompID); if (SupID.Count() == 1) { return(Json(IsResult)); } } #endregion } catch (Exception ex) { CreateLogFiles(ex); } return(Json(new { IsResult = svFavCompany.IsResult, MsgError = GenerateMsgError(svFavCompany.MsgError), ID = model.FavCompID })); }
public FavoriteController() { svFavProduct = new FavProductService(); svFavBuylead = new FavBuyleadService(); svFavCompany = new FavCompanyService(); svBizType = new BizTypeService(); svCompany = new CompanyService(); svAddress = new AddressService(); }
public ActionResult GetCompName(string query) { svFavCompany = new FavCompanyService(); sqlWhere = svFavCompany.CreateWhereAction(FavAction.IsFav, 0); sqlWhere += svFavCompany.CreateWhereCause(0, query, 0, 0, 0, 0, 0, 0, 0); var FavComp = svFavCompany.SelectData <view_FavCompany>("CompName", sqlWhere, "CompName"); var CompName = FavComp.Select(it => it.CompName).ToList(); return(Json(CompName)); }
public ActionResult DeleteFavComp(List <int> FavSupplierID) { var svFavCompany = new FavCompanyService(); try { svFavCompany.Delete(FavSupplierID, LogonCompID); } catch (Exception ex) { svFavCompany.MsgError.Add(ex); CreateLogFiles(ex); } return(Json(new { IsResult = svFavCompany.IsResult, MsgError = GenerateMsgError(svFavCompany.MsgError) })); }