Ejemplo n.º 1
0
        protected string BindPrizeName(object prizeLevel, object rotateID)
        {
            string result = "";

            Chain.BLL.SysRotate   bllSysRotate   = new Chain.BLL.SysRotate();
            Chain.Model.SysRotate modelSysRotate = bllSysRotate.GetModel(int.Parse(rotateID.ToString()));
            if (modelSysRotate != null)
            {
                string text = prizeLevel.ToString();
                if (text != null)
                {
                    if (!(text == "一等奖"))
                    {
                        if (!(text == "二等奖"))
                        {
                            if (!(text == "三等奖"))
                            {
                                if (!(text == "四等奖"))
                                {
                                    if (!(text == "五等奖"))
                                    {
                                        if (text == "六等奖")
                                        {
                                            result = modelSysRotate.SixPrizeName;
                                        }
                                    }
                                    else
                                    {
                                        result = modelSysRotate.FivePrizeName;
                                    }
                                }
                                else
                                {
                                    result = modelSysRotate.FourPrizeName;
                                }
                            }
                            else
                            {
                                result = modelSysRotate.ThreePrizeName;
                            }
                        }
                        else
                        {
                            result = modelSysRotate.TwoPrizeName;
                        }
                    }
                    else
                    {
                        result = modelSysRotate.OnePrizeName;
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
 private void GetSysRotate()
 {
     if (base.Request.QueryString["rotateID"] != null)
     {
         int rotateID = int.Parse(base.Request.QueryString["rotateID"]);
         Chain.BLL.SysRotate   bllSysRotate   = new Chain.BLL.SysRotate();
         Chain.Model.SysRotate modelSysRotate = bllSysRotate.GetModel(rotateID);
         this.txtRotateName.Value      = modelSysRotate.RotateName;
         this.txtRotateID.Value        = modelSysRotate.RotateID.ToString();
         this.txtRotateRemark.Value    = modelSysRotate.RotateRemark;
         this.txtStartTime.Value       = modelSysRotate.StartTime.ToString("yyyy-MM-dd HH:mm");
         this.txtEndTime.Value         = modelSysRotate.EndTime.ToString("yyyy-MM-dd HH:mm");
         this.txtOnePrizeCount.Value   = modelSysRotate.OnePrizeCount.ToString();
         this.txtOnePrizeName.Value    = modelSysRotate.OnePrizeName;
         this.txtTwoPrizeCount.Value   = modelSysRotate.TwoPrizeCount.ToString();
         this.txtTwoPrizeName.Value    = modelSysRotate.TwoPrizeName;
         this.txtThreePrizeCount.Value = modelSysRotate.ThreePrizeCount.ToString();
         this.txtThreePrizeName.Value  = modelSysRotate.ThreePrizeName;
         this.txtFourPrizeCount.Value  = modelSysRotate.FourPrizeCount.ToString();
         this.txtFourPrizeName.Value   = modelSysRotate.FourPrizeName;
         this.txtFivePrizeCount.Value  = modelSysRotate.FivePrizeCount.ToString();
         this.txtFivePrizeName.Value   = modelSysRotate.FivePrizeName;
         this.txtSixPrizeCount.Value   = modelSysRotate.SixPrizeCount.ToString();
         this.txtSixPrizeName.Value    = modelSysRotate.SixPrizeName;
         this.txtOneRate.Value         = modelSysRotate.OneRate.ToString();
         this.txtTwoRate.Value         = modelSysRotate.TwoRate.ToString();
         this.txtThreeRate.Value       = modelSysRotate.ThreeRate.ToString();
         this.txtFourRate.Value        = modelSysRotate.FourRate.ToString();
         this.txtFiveRate.Value        = modelSysRotate.FiveRate.ToString();
         this.txtSixRate.Value         = modelSysRotate.SixRate.ToString();
         this.txtRotateRegion.Value    = modelSysRotate.RotateRegion;
         this.imgRotatePhoto.Src       = modelSysRotate.ImageUrl;
         this.txtRotatePhoto.Value     = modelSysRotate.ImageUrl;
         this.txtOneMobile.Value       = modelSysRotate.OneMobile;
         this.txtTwoMobile.Value       = modelSysRotate.TwoMobile;
         this.txtThreeMobile.Value     = modelSysRotate.ThreeMobile;
         this.txtFourMobile.Value      = modelSysRotate.FourMobile;
         this.txtFiveMobile.Value      = modelSysRotate.FiveMobile;
         this.txtSixMobile.Value       = modelSysRotate.SixMobile;
         this.txtOneWinCount.Value     = modelSysRotate.OnePrizeWinCount.ToString();
         this.txtTwoWinCount.Value     = modelSysRotate.TwoPrizeWinCount.ToString();
         this.txtThreeWinCount.Value   = modelSysRotate.ThreePrizeWinCount.ToString();
         this.txtFourWinCount.Value    = modelSysRotate.FourPrizeWinCount.ToString();
         this.txtFiveWinCount.Value    = modelSysRotate.FivePrizeWinCount.ToString();
         this.txtSixWinCount.Value     = modelSysRotate.SixPrizeWinCount.ToString();
         this.txtOneName.Value         = modelSysRotate.OneName;
         this.txtTwoName.Value         = modelSysRotate.TwoName;
         this.txtThreeName.Value       = modelSysRotate.ThreeName;
         this.txtFourName.Value        = modelSysRotate.FourName;
         this.txtFiveName.Value        = modelSysRotate.FiveName;
         this.txtSixName.Value         = modelSysRotate.SixName;
         if (modelSysRotate.IsWinOne == 1)
         {
             this.cbkIsWinOne.Checked = true;
         }
         else
         {
             this.cbkIsWinOne.Checked = false;
         }
     }
 }