Ejemplo n.º 1
0
        /// <summary>
        /// 获取一条客户信息
        /// </summary>
        /// <param name="compNum">The comp number.</param>
        /// <param name="customerId">The customer identifier.</param>
        /// <returns>Dictionary&lt;System.String, System.Object&gt;.</returns>
        public Dictionary <string, object> GetCustomer(string selector, string expFields, string expSelector,
                                                       string predicate,
                                                       params object[] values)
        {
            var customer = CusBaseDao.GetCustomer(selector, expFields, expSelector, predicate, values);

            return(customer);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取客户信息列表 2014-08-29 14:58:50 By 唐有炜
        /// </summary>
        /// <param name="compNum">企业编号</param>
        /// <param name="selectFields">选择的字段(格式:new string[]{"id,cus_sname"},id必须要有)</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页的数目</param>
        /// <param name="strWhere">筛选条件(字段名="值",字段名 in (值1,值2))</param>
        /// <param name="filedOrder">排序字段(字段名)</param>
        /// <param name="recordCount">总数</param>
        /// <returns>DataTable</returns>
        public DataTable GetCustomerLsit(string compNum, string[] selectFields, int pageIndex, int pageSize,
                                         string strWhere, string filedOrder, out int recordCount)
        {
            DataTable table = CusBaseDao.GetCustomerLsit(compNum, selectFields, pageIndex, pageSize, strWhere,
                                                         filedOrder, out recordCount);

            return(table);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 使用LINQ更改客户状态(只更改主表) 2014-09-05 14:58:50 By 唐有炜
 /// </summary>
 /// <param name="fields">要更新的字段</param>
 /// <param name="predicate">条件</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool UpdateCustomerStatusByLINQ(Dictionary <string, object> fields,
                                        Expression <Func <TCusBase, bool> > predicate)
 {
     if (null == fields || null == predicate)
     {
         return(false);
     }
     return(CusBaseDao.UpdateTCusBaseStatusByLINQ(fields, predicate));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 使用where sql语句更改客户状态(只更改主表) 2014-09-05 14:58:50 By 唐有炜
        /// </summary>
        /// <param name="strSet">要更新的字段</param>
        /// <param name="strWhere">条件</param>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
        public bool UpdateCustomerStatusByWhere(string strSet, string strWhere)
        {
            if (String.IsNullOrEmpty(strSet) || String.IsNullOrEmpty(strWhere))
            {
                return(false);
            }

            return(CusBaseDao.UpdateCustomerStatusByWhere(strSet, strWhere));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取客户信息列表 2014-08-29 14:58:50 By 唐有炜
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页的数目</param>
        /// <param name="selector">要查询的字段</param>
        /// <param name="expFields">存储扩展字段值的字段</param>
        /// <param name="expSelector">要查询的扩展字段</param>
        /// <param name="predicate">查询条件</param>
        /// <param name="ordering">排序</param>
        /// <param name="recordCount">记录结果数</param>
        /// <param name="values">参数</param>
        /// <returns>客户信息列表</returns>
        public List <Dictionary <string, object> > GetCustomerLsit(int pageIndex, int pageSize, string selector,
                                                                   string expFields, string expSelector,
                                                                   string predicate, string ordering,
                                                                   out int recordCount, params object[] values)
        {
            var customers = CusBaseDao.GetCustomerLsit(pageIndex, pageSize, selector, expFields, expSelector, predicate,
                                                       ordering,
                                                       out recordCount, values);

            return(customers);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 验证手机号是否存在 2014-09-01  14:58:50 By 唐有炜
        /// </summary>
        /// <param name="cus_tel">手机号</param>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
        public bool ValidatePhone(string cus_tel)
        {
            bool IsExist = CusBaseDao.ExistsEntity(b => b.CusTel == cus_tel);

            return(!IsExist);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 修改客户信息 2014-09-21 14:58:50 By 唐有炜
 /// </summary>
 /// <param name="customerId">客户id</param>
 /// <param name="cusBase">客户信息</param>
 /// <param name="cusCon">主联系人信息</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool EditCustomer(int customerId, TCusBase cusBase, TCusCon cusCon)
 {
     return(CusBaseDao.EditCustomer(customerId, cusBase, cusCon));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 添加客户信息 2014-08-30 14:58:50 By 唐有炜
 /// </summary>
 /// <param name="cusBase">客户信息</param>
 /// <param name="cusCon">主联系人信息</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool AddCustomer(TCusBase cusBase, TCusCon cusCon)
 {
     return(CusBaseDao.AddCustomer(cusBase, cusCon));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 批量改状态
 /// </summary>
 /// <param name="cus_ids">id集合</param>
 /// <param name="op">操作(0 1)</param>
 /// <param name="field">字段</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool UpdateStatusMoreCustomer(string cus_ids, int op, string field)
 {
     return(CusBaseDao.UpdateStatusMoreCustomer(cus_ids, op, field));
 }