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


C# Member.Select方法代码示例

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


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

示例1: InitForm

        private void InitForm()
        {
            lblMemberName.Text = string.Format("<b>{0}</b> (<em>NO.{1}</em>)", this.MemberName, this.MID.ToString());
            lblMemberACNInfo.Text = string.Format("<b>{0}</b> (<em>ID.{1}</em>)", this.Username, this.UID.ToString());

            //Fill Member draft information into textbox
            Member m = new Member();
            m.MemberID = this.MID;
            m.Select();

            tbIDCardNo.Text = m.IDCardNo;
            tbOrderMobile.Text = m.Mobile;
            tbAlipay.Text = m.TaobaoName;

            #region Set Member Nation & Region
            if (!string.IsNullOrEmpty(m.Nation))
            {
                if (m.Nation.Equals("中国"))
                {
                    ddlNation.SelectedValue = m.Nation;

                    string[] region = m.Region.Split('|');
                    if (region.Length > 1)
                    {
                        tbRegion1.Text = region[0];
                        tbRegion2.Text = region[1];
                    }
                    else
                    {
                        tbRegion1.Text = region[0];
                        tbRegion2.Text = string.Empty;
                    }
                }
                else
                {
                    ddlNation.SelectedValue = "其他";
                    if (m.Nation.Equals("其他"))
                        tbNation.Text = string.Empty;
                    else
                        tbNation.Text = m.Nation;
                }
            }
            else
            {
                ddlNation.SelectedValue = string.Empty;
            }
            #endregion

            List<Product> list = Product.Cache.GetActiveProductListByCodes(ConfigGlobal.CodeTicketBeijing);

            if (list != null)
            {
                ddlTicketBeijing.DataSource = list;
                ddlTicketBeijing.DataValueField = "ProductGuid";
                ddlTicketBeijing.DataBind();

                ddlTicketBeijing.Items.Insert(0, new ListItem("--请选择球票类型--", string.Empty));
            }
        }
开发者ID:CyranoChen,项目名称:Arsenalcn,代码行数:59,代码来源:iArsenalOrder_TicketBeijing.aspx.cs

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