public async Task <object> ProductList(long cid)
        {
            object data = await T_Customer_BLL.GetCustomerProducts(cid);

            return(Ok(new {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #2
0
        public async Task <object> RemoveProduct(dynamic pid)
        {
            object data = await T_Customer_BLL.RemoveCustomerProduct(pid);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
        public async Task <object> List(long cid)
        {
            var data = await T_Customer_BLL.GetCustomerTasks(cid);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #4
0
        public async Task <object> GetProducts()
        {
            object data = await T_Customer_BLL.GetProducts();

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #5
0
        public async Task <object> SaveProduct(T_Product model)
        {
            object data = await T_Customer_BLL.SaveProduct(model);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
        public async Task <object> Find(long taskId)
        {
            var data = await T_Customer_BLL.GetCustomerTask(taskId);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #7
0
        public async Task <object> Register(long cid)
        {
            int effects = await T_Customer_BLL.RemoveCustomerRole(cid);

            return(Ok(new
            {
                statusCode = 200,
                result = effects
            }));
        }
Beispiel #8
0
        public async Task <object> CheckCustomer(string userName)
        {
            var o = await T_Customer_BLL.CheckUserName(userName);

            return(Ok(new
            {
                statusCode = 200,
                result = o
            }));
        }
Beispiel #9
0
        public async Task <object> GetCustomer(T_Customer model)
        {
            object o = await T_Customer_BLL.GetCustomer(model.Cid);

            return(Ok(new
            {
                statusCode = 200,
                result = o
            }));
        }
Beispiel #10
0
        public async Task <object> GetProduct(long pid)
        {
            var data = await T_Customer_BLL.GetCustomerProduct(pid);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #11
0
        public async Task <object> Remove(long taskId)
        {
            string s       = string.Empty;
            object effects = await T_Customer_BLL.RemoveCustomerTask(taskId);

            return(Ok(new
            {
                statusCode = 200,
                result = effects
            }));
        }
Beispiel #12
0
        public async Task <object> GetRoles(CustomerParams param)
        {
            param.CategoryId = "0";
            param.Cids       = new string[] { };
            var data = await T_Customer_BLL.GetCustomers(param);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #13
0
        public async Task <object> GetCustomers(CustomerParams param)
        {
            string[] str = new string[] { };

            var data = await T_Customer_BLL.GetCustomers(param);

            return(Ok(new
            {
                statusCode = 200,
                result = data
            }));
        }
Beispiel #14
0
        public async Task <object> Register(T_JSON model)
        {
            T_Customer customer = new T_Customer();
            object     effects  = 0;

            if (model.Input0 != null)
            {
                string s = string.Empty;
                s        = POSTJson.ResolveTJSON(model);
                customer = JsonConvert.DeserializeObject <T_Customer>(s);
                effects  = await T_Customer_BLL.SaveCustomer(customer);
            }
            return(Ok(new
            {
                statusCode = 200,
                result = effects
            }));
        }
Beispiel #15
0
        public async Task <object> Submit(T_JSON model)
        {
            T_Customer_Role role    = new T_Customer_Role();
            object          effects = 0;

            if (model.Input0 != null)
            {
                string s = string.Empty;
                s       = POSTJson.ResolveTJSON(model);
                role    = JsonConvert.DeserializeObject <T_Customer_Role>(s);
                effects = await T_Customer_BLL.SaveCustomerRole(role);
            }
            return(Ok(new
            {
                statusCode = 200,
                result = effects
            }));
        }
Beispiel #16
0
        public async Task <object> GetRole(T_Customer_Role model)
        {
            object o = new { };
            //if (model.Input0 != null)
            //{
            string s = string.Empty;

            //s = POSTJson.ResolveTJSON(model);
            //customer = JsonConvert.DeserializeObject<T_Customer>(s);
            o = await T_Customer_BLL.GetCustomerRole(model.Cid);

            //}
            return(Ok(new
            {
                statusCode = 200,
                result = o
            }));
        }
Beispiel #17
0
        public async Task <object> Save(T_JSON model)
        {
            object          effects = 0;
            T_Customer_Task task    = new T_Customer_Task();

            if (model.Input0 != null)
            {
                string s = string.Empty;
                s       = POSTJson.ResolveTJSON(model);
                task    = JsonConvert.DeserializeObject <T_Customer_Task>(s);
                effects = await T_Customer_BLL.SaveCustomerTask(task);
            }
            return(Ok(new
            {
                statusCode = 200,
                result = effects
            }));
        }