Exemplo n.º 1
0
        protected void gvList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string userId    = e.CommandArgument.ToString();
            string userEmail = MemberInfo.GetBaseInfo(userId).UserEmail;

            switch (e.CommandName)
            {
            case "show":
                Response.Redirect("ShowMemberInfo.aspx?userid=" + userId, true);
                Response.End();
                break;

            case "agree":
                MemberInfo.ConfirmUserChange(userId);
                NotifyHelper.SendMessage(userId, "您的身份转换申请已审核通过", "您的身份转换申请已审核通过");
                NotifyHelper.SendMail(userEmail, "您的身份转换申请已审核通过", "您的身份转换申请已审核通过");
                break;

            case "reject":
                MemberInfo.RejectUserChange(userId);
                NotifyHelper.SendMessage(userId, "您的身份转换申请被拒绝", "您的身份转换申请被拒绝");
                NotifyHelper.SendMail(userEmail, "您的身份转换申请被拒绝", "您的身份转换申请被拒绝");
                break;
            }
            BindList();
        }
Exemplo n.º 2
0
        protected void lbtnDoCreate_Click(object sender, EventArgs e)
        {
            AddressModel addr = ucAddress.GetSelectedAddressInfo(this.CurrentUser.UserId);

            if (addr == null)
            {
                this.ClientAlert("收货人地址信息不完整,请重新填写");
                return;
            }
            if (String.IsNullOrEmpty(CurrentShopCart.OrderId) || !CurrentShopCart.Exists())
            {
                CurrentShopCart.Address      = addr;
                CurrentShopCart.UserNotes    = txtUserNotes.Text.Trim();
                CurrentShopCart.PayMethodId  = int.Parse(this.rbtlPayMethod.SelectedValue);
                CurrentShopCart.ShipMethodId = int.Parse(this.rbtlShipMethod.SelectedValue);

                if (CurrentShopCart is CommShopCart)
                {
                    CurrentShopCart.ShipFee = ((CommShopCart)CurrentShopCart).CaculateShipFee(CurrentShopCart.ShipMethodId,
                                                                                              CurrentShopCart.Address.RegionId);
                }
                else if (CurrentShopCart is SuitShopCart)
                {
                    CurrentShopCart.ShipFee = ((SuitShopCart)CurrentShopCart).CaculateShipFee(CurrentShopCart.ShipMethodId,
                                                                                              CurrentShopCart.Address.RegionId);
                }

                string isNeedInvoce = ReqParas["invoice"].Trim();
                if (isNeedInvoce == "1")
                {
                    CurrentShopCart.Invoice = ReqParas["invoiceTitle"].Trim();
                }
                else
                {
                    CurrentShopCart.Invoice = String.Empty;
                }
                if (CurrentShopCart.PreSaveValidate())
                {
                    CurrentShopCart.Save();
                    NotifyHelper.SendMessage(CurrentUser.UserId, "您刚刚提交了一个新订单", "您刚刚提交了一个新订单");
                    NotifyHelper.SendMail(CurrentUser.UserEmail, "您刚刚提交了一个新订单", "您刚刚提交了一个新订单");
                    Context.Items.Add("SavedOrderId", CurrentShopCart.OrderId);
                    CurrentShopCart.RecentSavedOrderId = CurrentShopCart.OrderId;
                    CurrentShopCart.OrderId            = String.Empty;
                    CurrentShopCart.OrderProducts.Clear();
                    CurrentShopCart.SaveCartToCookie();
                    CurrentShopCart.GoNext();
                }
            }
        }