Ejemplo n.º 1
0
        private void lkbtnDeleteCheck_Click(object sender, System.EventArgs e)
        {
            int num = 0;

            foreach (System.Web.UI.WebControls.GridViewRow gridViewRow in this.grdGroupBuyList.Rows)
            {
                System.Web.UI.WebControls.CheckBox checkBox = (System.Web.UI.WebControls.CheckBox)gridViewRow.FindControl("checkboxCol");
                if (checkBox.Checked)
                {
                    num++;
                    int groupBuyId = System.Convert.ToInt32(this.grdGroupBuyList.DataKeys[gridViewRow.RowIndex].Value, System.Globalization.CultureInfo.InvariantCulture);
                    SubsitePromoteHelper.DeleteGroupBuy(groupBuyId);
                }
            }
            if (num != 0)
            {
                this.BindGroupBuy();
                this.ShowMsg(string.Format(System.Globalization.CultureInfo.InvariantCulture, "成功删除\"{0}\"条团购活动", new object[]
                {
                    num
                }), true);
                return;
            }
            this.ShowMsg("请先选择需要删除的团购活动", false);
        }
Ejemplo n.º 2
0
        private void grdGroupBuyList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            GroupBuyInfo groupBuy = SubsitePromoteHelper.GetGroupBuy((int)grdGroupBuyList.DataKeys[e.RowIndex].Value);

            if ((groupBuy.Status == GroupBuyStatus.UnderWay) || (groupBuy.Status == GroupBuyStatus.EndUntreated))
            {
                ShowMsg("团购活动正在进行中或结束未处理,不允许删除", false);
            }
            else if (SubsitePromoteHelper.DeleteGroupBuy((int)grdGroupBuyList.DataKeys[e.RowIndex].Value))
            {
                BindGroupBuy();
                ShowMsg("成功删除了选择的团购活动", true);
            }
            else
            {
                ShowMsg("删除失败", false);
            }
        }
Ejemplo n.º 3
0
        private void grdGroupBuyList_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            GroupBuyInfo groupBuy = SubsitePromoteHelper.GetGroupBuy((int)this.grdGroupBuyList.DataKeys[e.RowIndex].Value);

            if (groupBuy.Status != GroupBuyStatus.UnderWay)
            {
                if (groupBuy.Status != GroupBuyStatus.EndUntreated)
                {
                    if (SubsitePromoteHelper.DeleteGroupBuy((int)this.grdGroupBuyList.DataKeys[e.RowIndex].Value))
                    {
                        this.BindGroupBuy();
                        this.ShowMsg("成功删除了选择的团购活动", true);
                        return;
                    }
                    this.ShowMsg("删除失败", false);
                    return;
                }
            }
            this.ShowMsg("团购活动正在进行中或结束未处理,不允许删除", false);
        }
Ejemplo n.º 4
0
        private void lkbtnDeleteCheck_Click(object sender, EventArgs e)
        {
            int num = 0;

            foreach (GridViewRow row in grdGroupBuyList.Rows)
            {
                CheckBox box = (CheckBox)row.FindControl("checkboxCol");
                if (box.Checked)
                {
                    num++;
                    SubsitePromoteHelper.DeleteGroupBuy(Convert.ToInt32(grdGroupBuyList.DataKeys[row.RowIndex].Value, CultureInfo.InvariantCulture));
                }
            }
            if (num != 0)
            {
                BindGroupBuy();
                ShowMsg(string.Format(CultureInfo.InvariantCulture, "成功删除\"{0}\"条团购活动", new object[] { num }), true);
            }
            else
            {
                ShowMsg("请先选择需要删除的团购活动", false);
            }
        }