public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //context.Response.Write("Hello World"); int id = Convert.ToInt32(context.Request.QueryString["id"]); BLL.t_reward_distribution bll = new BLL.t_reward_distribution(); Model.t_reward_distribution model = bll.GetModel(id); string _action = context.Request.QueryString["action"]; if (_action == DTEnums.ActionEnum.Confirm.ToString()) { bll.SetStatus(); model.IsDefault = 1; bll.Update(model); //JscriptMsg("启用成功!", "reward_distribution_list.aspx"); context.Response.Write("parent.jsprint(\"启用成功!\", \"reward_distribution_list.aspx\")"); context.Response.Redirect("reward_distribution_list.aspx"); } else if (_action == DTEnums.ActionEnum.Invalid.ToString()) { model.IsDefault = 0; bll.Update(model); //JscriptMsg("禁用成功!", "reward_distribution_list.aspx"); //context.Response.Write("parent.jsprint(\"启用成功!\", \"reward_distribution_list.aspx\")"); context.Response.Redirect("reward_distribution_list.aspx"); } }
private void ShowInfo(int _id) { BLL.t_reward_distribution bll = new BLL.t_reward_distribution(); Model.t_reward_distribution model = bll.GetModel(_id); txt_DistributionName.Text = model.DistributionName; txt_PlatformRatio.Text = (model.PlatformRatio * 100).ToString(); txt_AgentRatio.Text = (model.AgentRatio * 100).ToString(); txt_StoreRatio.Text = (model.StoreRatio * 100).ToString(); txt_BusinessRatio.Text = (model.BusinessRatio * 100).ToString(); txt_DistributionName.Text = model.DistributionName; if (model.IsDefault == 1) { rad_IsDefault02.Checked = true; } else { rad_IsDefault01.Checked = true; } if (model.IsUse == 1) { rad_IsUse02.Checked = true; } else { rad_IsUse01.Checked = true; } if (model.IsDeleted == 1) { rad_IsDeleted02.Checked = true; } else { rad_IsDeleted01.Checked = true; } }