Ejemplo n.º 1
0
        /// <summary>
        /// 分页控件删除操作
        /// </summary>
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            if (!HasFunction("Generatecoupons/edit"))
            {
                MessageDxUtil.ShowError(Const.NoAuthMsg);
                return;
            }

            int[] rowSelected = this.winGridViewPager1.GridView1.GetSelectedRows();
            if (rowSelected.Length > 1 || rowSelected.Length == 0)
            {
                return;
            }
            string ID = this.winGridViewPager1.GridView1.GetRowCellDisplayText(rowSelected[0], "ID");

            FrmGenerateCoupon dlg = new FrmGenerateCoupon();

            dlg.Text         = Const.Edit + dlg.Text;
            dlg.ID           = ID;
            dlg.OnDataSaved += new EventHandler(winGridViewPager1_OnRefresh);
            if (DialogResult.OK == dlg.ShowDialog())
            {
                BindData();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 生成优惠券
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            FrmGenerateCoupon dlg = new FrmGenerateCoupon();

            dlg.Text         = Const.Add + dlg.Text;
            dlg.OnDataSaved += new EventHandler(winGridViewPager1_OnRefresh);
            if (DialogResult.OK == dlg.ShowDialog())
            {
                BindData();
            }
        }