Exemplo n.º 1
0
        public dynamic AddCustomerDelivery()
        {
            int         customerId = Fun.Form("customerId", 0);
            string      time       = Fun.Form("time");
            string      type       = Fun.Form("type");
            string      money      = Fun.Form("money");
            string      name       = Fun.Form("name");
            string      phone      = Fun.Form("phone");
            string      address    = Fun.Form("address");
            string      cubiloses  = Fun.Form("cubilose");
            string      nums       = Fun.Form("num");
            string      GPs        = Fun.Form("GP");
            string      memo       = Fun.Form("memo");
            CustomerBLL bll        = new CustomerBLL();

            if (bll.AddCustomerDelivery(time, type, money, customerId, name, phone, address, cubiloses, nums, GPs, memo))
            {
                string[] cubiloseId = cubiloses.Split('|');
                string[] totalNum   = nums.Split('|');
                for (int i = 0; i < totalNum.Length; i++)
                {
                    totalNum[i] = "-" + totalNum[i];
                }
                if (bll.AddCustomerCubilose(customerId, cubiloseId, totalNum, -1))
                {
                    return("成功");
                }
                else
                {
                    return("失败");
                }
            }
            else
            {
                return("失败");
            }
        }