当前位置: 首页>>代码示例>>C#>>正文


C# Member.Update方法代码示例

本文整理汇总了C#中Member.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Member.Update方法的具体用法?C# Member.Update怎么用?C# Member.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Member的用法示例。


在下文中一共展示了Member.Update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSubmit_Click

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(ddlTicketBeijing.SelectedValue))
                {
                    Member m = new Member();
                    m.MemberID = this.MID;
                    m.Select();

                    // Update Current Member Info
                    m.IDCardNo = tbIDCardNo.Text.Trim();

                    #region Get Member Nation & Region
                    string _nation = ddlNation.SelectedValue;

                    if (!string.IsNullOrEmpty(_nation))
                    {
                        if (_nation.Equals("中国"))
                        {
                            m.Nation = _nation;
                            if (!string.IsNullOrEmpty(tbRegion1.Text.Trim()))
                            {
                                if (!string.IsNullOrEmpty(tbRegion2.Text.Trim()))
                                {
                                    m.Region = string.Format("{0}|{1}", tbRegion1.Text.Trim(), tbRegion2.Text.Trim());
                                }
                                else
                                {
                                    m.Region = tbRegion1.Text.Trim();
                                }
                            }
                            else
                            {
                                m.Region = string.Empty;
                            }
                        }
                        else if (!string.IsNullOrEmpty(tbNation.Text.Trim()))
                        {
                            m.Nation = tbNation.Text.Trim();
                            m.Region = string.Empty;
                        }
                        else
                        {
                            m.Nation = _nation;
                            m.Region = string.Empty;
                        }
                    }
                    else
                    {
                        m.Nation = string.Empty;
                        m.Region = string.Empty;
                    }
                    #endregion

                    m.Update();

                    //New Order
                    Order o = new Order();

                    o.MemberID = m.MemberID;
                    o.MemberName = m.Name;
                    o.Mobile = tbOrderMobile.Text.Trim();
                    o.Address = string.Empty;
                    o.Payment = "{" + rblOrderPayment.SelectedValue + "|" + tbAlipay.Text.Trim() + tbBankName.Text.Trim() + tbBankAccount.Text.Trim() + "}";
                    o.Price = 0f;
                    o.Sale = null;
                    o.Deposit = null;
                    o.Postage = 0f;
                    o.Status = OrderStatus.Draft;
                    o.Rate = 0;
                    o.CreateTime = DateTime.Now;
                    o.UpdateTime = DateTime.Now;
                    o.IsActive = true;
                    o.Description = tbOrderDescription.Text.Trim();
                    o.Remark = string.Empty;

                    //Get the Order ID after Insert new one
                    o.Insert();
                    o.Select();

                    if (o.OrderID > 0)
                    {
                        //New Order Item for Tickets
                        Product pTicketBeijing = new Product();
                        pTicketBeijing.ProductGuid = new Guid(ddlTicketBeijing.SelectedValue);
                        pTicketBeijing.Select();

                        if (pTicketBeijing == null)
                            throw new Exception("无相关商品或缺货,请联系管理员");

                        string oiRemark = string.Empty;

                        if (cbDaytimeEvent.Checked)
                            oiRemark += (" {" + cbDaytimeEvent.Text.Trim() + "}");

                        if (cbEveningEvent.Checked)
                            oiRemark += " {" + cbEveningEvent.Text.Trim() + "}";

                        OrderItem.WishOrderItem(m, pTicketBeijing, o, ddlSeatLevel.SelectedValue, Convert.ToInt32(tbQuantity.Text.Trim()), null, oiRemark.Trim());
//.........这里部分代码省略.........
开发者ID:CyranoChen,项目名称:Arsenalcn,代码行数:101,代码来源:iArsenalOrder_TicketBeijing.aspx.cs


注:本文中的Member.Update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。