protected void btnSave_Click(object sender, EventArgs e)
        {
            decimal sum  = 0;
            int     Type = 0;

            foreach (GridViewRow row in gvXMProduct.Rows)
            {
                var ddlDemand = row.FindControl("ddlDemand") as RadioButtonList;
                int Demand    = int.Parse(ddlDemand.SelectedValue);
                Type = base.XMZMDemandService.GetXMZMDemandTidByID(Demand);
                var     product  = base.XMZMReservationService.GetXMZMReservationListByInstallationID(Id, Type);
                decimal lblPrice = Convert.ToDecimal(((Label)row.FindControl("lblPrice")).Text.Trim());
                sum += lblPrice;

                XMZMReservation Info2 = new XMZMReservation();
                Info2.Remarks  = lblPrice.ToString();
                Info2.DemandID = Demand;
                //Info2.TypeID = Type;

                product.DemandID = Info2.DemandID;
                product.Remarks  = Info2.Remarks;

                base.XMZMReservationService.UpdateXMZMReservation(Info2);
            }
            HozestERP.BusinessLogic.ManageCustomerService.XMInstallationList Info = new HozestERP.BusinessLogic.ManageCustomerService.XMInstallationList();
            var product2 = base.XMInstallationListService.GetXMInstallationListByID(Id);

            Info.InstallationFee     = sum;
            product2.InstallationFee = Info.InstallationFee;
            base.XMInstallationListService.UpdateXMInstallationList(Info);
            base.ShowMessage("保存成功!");
            this.BindGrid();
        }
        /// <summary>
        /// Update into XMInstallationList
        /// </summary>
        /// <param name="xminstallationlist">XMInstallationList</param>
        public void UpdateXMInstallationList(XMInstallationList xminstallationlist)
        {
            if (xminstallationlist == null)
            {
                return;
            }

            if (this._context.IsAttached(xminstallationlist))
            {
                this._context.XMInstallationLists.Attach(xminstallationlist);
            }

            this._context.SaveChanges();
        }
        /// <summary>
        /// Insert into XMInstallationList
        /// </summary>
        /// <param name="xminstallationlist">XMInstallationList</param>
        public void InsertXMInstallationList(XMInstallationList xminstallationlist)
        {
            if (xminstallationlist == null)
            {
                return;
            }

            if (!this._context.IsAttached(xminstallationlist))
            {
                this._context.XMInstallationLists.AddObject(xminstallationlist);
            }

            this._context.SaveChanges();
        }