public static List <UserBL> getUsersByShopId(Int32 iShopId) { SummitDS.MarketingUsersDataTable thisTable = getAdapter().GetDataByShopId(iShopId); List <UserBL> lstUsers = new List <UserBL>(); if (thisTable != null && thisTable.Rows.Count > 0) { List <MarketingUsers> lstMarketingUsers = BuildFromTable(thisTable); if (lstMarketingUsers != null) { foreach (MarketingUsers marketingUsers in lstMarketingUsers) { UserBL objUser = UserBL.getByActivityId(marketingUsers.iUserId); if (objUser != null) { lstUsers.Add(objUser); } } } } return(lstUsers); }
public static Boolean isInEmailMarketing(Int32 iShopId, Int32 iUserId, Int32 iVehicleId) { SummitDS.MarketingUsersDataTable thisTable = new SummitDS.MarketingUsersDataTable(); UserBL objUser = UserBL.getByActivityId(iUserId); if (objUser != null) { if (objUser.bIsShowEmailMarketing != null && objUser.bIsShowEmailMarketing == true) { thisTable = getAdapter().GetDataByShopUserAndVehicleId(iShopId, iUserId, iVehicleId); MarketingUsers objMarketingUser = null; if (thisTable.Rows.Count > 0) { objMarketingUser = BuildFromRow(thisTable.Rows[0]); if (objMarketingUser != null) { return(true); } } } } return(false); }