示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }