public static MarketingUsers getDataByShopUserAndVehicleId(Int32 iShopId, Int32 iUserId, Int32 iVehicleId) { SummitDS.MarketingUsersDataTable thisTable = new SummitDS.MarketingUsersDataTable(); thisTable = getAdapter().GetDataByShopUserAndVehicleId(iShopId, iUserId, iVehicleId); MarketingUsers objMarketingUser = null; if (thisTable.Rows.Count > 0) { objMarketingUser = BuildFromRow(thisTable.Rows[0]); return(objMarketingUser); } return(objMarketingUser); }
private static List <MarketingUsers> BuildFromTable(DataTable dtTable) { List <MarketingUsers> _list = new List <MarketingUsers>(); if (dtTable != null) { foreach (DataRow dr in dtTable.Rows) { MarketingUsers _thisMember = new MarketingUsers(dr); _list.Add(_thisMember); } } return(_list); }
public static Boolean isInProcess(Int32 iShopId, Int32 iUserId, Int32 iVehicleId) { SummitDS.MarketingUsersDataTable thisTable = new SummitDS.MarketingUsersDataTable(); thisTable = getAdapter().GetDataByShopUserAndVehicleId(iShopId, iUserId, iVehicleId); MarketingUsers objMarketingUser = null; if (thisTable.Rows.Count > 0) { objMarketingUser = BuildFromRow(thisTable.Rows[0]); if (objMarketingUser.bisShowInProcess != null && objMarketingUser.bisShowInProcess == true) { return(true); } } return(false); }
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); }