/// <summary>
        /// 保存采购计划单
        /// </summary>
        /// <typeparam name="THead">采购计划头模板</typeparam>
        /// <typeparam name="TDetail">采购计划明细模板</typeparam>
        /// <param name="billHead">采购计划表头</param>
        /// <param name="billDetails">采购计划明细</param>
        public override void SaveBill <THead, TDetail>(THead billHead, List <TDetail> billDetails)
        {
            DW_PlanHead          head    = billHead as DW_PlanHead;
            List <DW_PlanDetail> details = billDetails as List <DW_PlanDetail>;

            if (head.PlanHeadID == 0)
            {
                head.RegTime    = System.DateTime.Now;
                head.UpdateTime = System.DateTime.Now;
            }
            else
            {
                head.UpdateTime = System.DateTime.Now;
            }

            BindDb(head);
            head.save();
            if (head.PlanHeadID > 0)
            {
                foreach (DW_PlanDetail detail in details)
                {
                    detail.PlanHeadID = head.PlanHeadID;
                    BindDb(detail);
                    detail.save();
                }
            }
        }
        public ServiceResponseData AuditBill()
        {
            try
            {
                DW_PlanHead head = requestData.GetData <DW_PlanHead>(0);
                head.AuditTime = System.DateTime.Now;
                this.BindDb(head);
                head.save();
                responseData.AddData(true);
            }
            catch (Exception error)
            {
                responseData.AddData(false);
                responseData.AddData(error.Message);
            }

            return(responseData);
        }