Ejemplo n.º 1
0
        /// <summary>
        /// 获取客户状态列表
        /// </summary>
        /// <returns></returns>
        public JsonResult drpCustomerStateList()
        {
            DaCustomerState       dal    = new DaCustomerState();
            IList <CustomerState> states = dal.getList();

            var result = new CustomJsonResult();

            result.Data = states;
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取客户状态列表
        /// </summary>
        /// <returns></returns>
        public JsonResult CustomerState_getList()
        {
            DaCustomerState       dal    = new DaCustomerState();
            IList <CustomerState> states = dal.getList();

            var result = new CustomJsonResult();

            result.Data = new { total = states.Count, rows = states };
            return(result);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 删除客户状态
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult CustomerState_remove(string id)
        {
            CustomerState en = new CustomerState();

            en.id = Convert.ToInt32(id);

            DaCustomerState dal    = new DaCustomerState();
            var             result = new CustomJsonResult();

            result.Data = dal.delete(en);
            return(result);
        }
Ejemplo n.º 4
0
        public JsonResult CustomerState_add(string state, string memo)
        {
            CustomerState en = new CustomerState();

            en.state = state;
            en.memo  = memo;

            DaCustomerState dal    = new DaCustomerState();
            var             result = new CustomJsonResult();

            result.Data = dal.add(en);
            return(result);
        }
Ejemplo n.º 5
0
        public JsonResult CustomerState_edit(string id, string state, string memo)
        {
            CustomerState en = new CustomerState();

            en.id    = Convert.ToInt32(id);
            en.state = state;
            en.memo  = memo;

            DaCustomerState dal    = new DaCustomerState();
            var             result = new CustomJsonResult();

            result.Data = dal.update(en);
            return(result);
        }