示例#1
0
        public ContentResult UploadPrizeInfo(int ID, string Phone, string Name, string Address)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(Phone))
                {
                    return(Content("手机号不能为空"));
                }
                if (Phone.Length != 11)
                {
                    return(Content("手机号有误"));
                }
                if (string.IsNullOrWhiteSpace(Name))
                {
                    return(Content("姓名不能为空"));
                }
                if (string.IsNullOrWhiteSpace(Address))
                {
                    return(Content("姓名不能为空"));
                }

                LotteryRecord rec = LotteryRecord.GetEntityByID(ID);
                rec.Phone      = Phone;
                rec.Name       = Name;
                rec.RecAddress = Address;

                rec.UpdateByID();

                return(Content("ok"));
            }
            catch (Exception ex)
            {
                return(Content("提交出错,请联系客服!"));
            }
        }
示例#2
0
        public ActionResult GetVerify(int id)
        {
            LotteryRecord r = LotteryRecord.GetEntityByID(id);

            if (r != null)
            {
                r.States = "已发放";
                r.ID     = r.UpdateByID();
            }
            else
            {
                return(Content("数据错误!!!"));
            }

            return(Content("ok"));
        }