Esempio n. 1
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var snInfo = new CouponSNInfo(e.Item.DataItem);

                var ltlItemIndex    = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlSN           = e.Item.FindControl("ltlSN") as Literal;
                var ltlStatus       = e.Item.FindControl("ltlStatus") as Literal;
                var ltlHoldDate     = e.Item.FindControl("ltlHoldDate") as Literal;
                var ltlHoldMobile   = e.Item.FindControl("ltlHoldMobile") as Literal;
                var ltlHoldEmail    = e.Item.FindControl("ltlHoldEmail") as Literal;
                var ltlHoldRealName = e.Item.FindControl("ltlHoldRealName") as Literal;
                var ltlCashDate     = e.Item.FindControl("ltlCashDate") as Literal;
                var ltlCashUserName = e.Item.FindControl("ltlCashUserName") as Literal;

                ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString();
                ltlSN.Text        = snInfo.SN;
                var status = ECouponStatusUtils.GetEnumType(snInfo.Status);
                ltlStatus.Text = ECouponStatusUtils.GetText(status);
                if (status == ECouponStatus.Cash || status == ECouponStatus.Hold)
                {
                    ltlHoldDate.Text     = DateUtils.GetDateAndTimeString(snInfo.HoldDate);
                    ltlHoldMobile.Text   = snInfo.HoldMobile;
                    ltlHoldEmail.Text    = snInfo.HoldEmail;
                    ltlHoldRealName.Text = snInfo.HoldRealName;
                }
                if (status == ECouponStatus.Cash)
                {
                    ltlCashDate.Text     = DateUtils.GetDateAndTimeString(snInfo.CashDate);
                    ltlCashUserName.Text = snInfo.HoldRealName;
                }
            }
        }
Esempio n. 2
0
        public override void Submit_OnClick(object sender, EventArgs e)
        {
            var isChanged = false;

            try
            {
                DataProviderWX.CouponSNDAO.UpdateStatus(ECouponStatusUtils.GetEnumType(ddlStatus.SelectedValue), TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]));

                isChanged = true;
            }
            catch (Exception ex)
            {
                FailMessage(ex, "失败:" + ex.Message);
            }

            if (isChanged)
            {
                JsUtils.OpenWindow.CloseModalPage(Page);
            }
        }