protected void btnSave_Click(object sender, EventArgs e)
    {
        PackageBusiness        Package = new PackageBusiness();
        RepeaterItemCollection Items   = ItemGroupRepeater.Items;
        CheckBox           chkSelected;
        Literal            lblGroupID;
        PackageGroupEntity PackageGroup;

        foreach (RepeaterItem Item in Items)
        {
            chkSelected     = (CheckBox)Item.FindControl("chkSelected");
            lblGroupID      = (Literal)Item.FindControl("lblGroupID");
            PackageGroup    = new PackageGroupEntity();
            PackageGroup.ID = new PackageGroupPK {
                PackageID = PackageID,
                GroupID   = Convert.ToInt32(lblGroupID.Text)
            };
            if (chkSelected.Checked)
            {
                Package.SavePackageGroup(PackageGroup);
            }
            if (!chkSelected.Checked)
            {
                Package.DeletePackageGroup(PackageGroup);
            }
        }
        decimal PackageCharge = Package.GetPackagePrice(PackageID);

        hValue.Value = PackageCharge + "";
        Package.UpdatePackagePrice(PackageID, PackageCharge);
        ShowMessage("套餐组合项保存成功!");
    }
Beispiel #2
0
 public void DeletePackageGroup(PackageGroupEntity PackageGroup)
 {
     m_PackageGroup.DeletePackageGroup(PackageGroup);
 }
Beispiel #3
0
 public void SavePackageGroup(PackageGroupEntity PackageGroup)
 {
     m_PackageGroup.SavePackageGroup(PackageGroup);
 }