Example #1
0
        public override int Query()
        {
            string _rolewhere = string.Empty;

            if (FishEntity.Variable.User.roletype.Equals(FishEntity.Constant.Role_SalesMan))
            {
                _rolewhere = string.Format(" and salesmancode ='{0}'", FishEntity.Variable.User.id);
            }

            FishBll.Bll.RemindBll bll = new FishBll.Bll.RemindBll();
            string where = " TO_DAYS(nextlinkdate) = TO_DAYS(now())";
            List <FishEntity.RemindEntity> list = bll.GetRemind(where + _rolewhere);

            dataGridView1.DataSource = list;
            return(1);
        }
Example #2
0
        /// <summary>
        /// 获得 需要联系的客户信息
        /// </summary>
        protected RemindEntity GetCustomer()
        {
            try
            {
                FishBll.Bll.RemindBll bll = new FishBll.Bll.RemindBll();
                //string where = string.Format( " nextlinkdate >='{0}'", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") );

                string where = string.Format(" salesmancode ='{0}' and TO_DAYS(nextlinkdate) = TO_DAYS(now()) limit 1", FishEntity.Variable.User.id);
                List <RemindEntity> list = bll.GetRemind(where);

                RemindEntity remind = null;  // _loginManager.GetAnnouncement( _cookieContainer );

                if (list != null && list.Count > 0)
                {
                    remind = list[0];
                }
                return(remind);
            }
            catch (Exception ex)
            {
                Utility.LogHelper.WriteException(ex);
                return(null);
            }
        }