protected void Initial() { try { if (Applications == null || Subside == null) { Subside = CY.CSTS.Core.Business.Subsidies.SelectNew(2); if (Subside != null) { Applications = CY.CSTS.Core.Business.SubsidiesApplication.SelectSubsidiesApplication(Subside, 2).Take(8); } } } catch (Exception ex) { throw ex; } }
protected void btnStart_Click(object sender, EventArgs e) { CY.CSTS.Core.Business.Subsidies subsidies = new CY.CSTS.Core.Business.Subsidies(); subsidies.Name = System.DateTime.Now.Year + "年" + System.DateTime.Now.Month + "月" + "重庆大型仪器资源共享平台用户补贴"; subsidies.AddTime = System.DateTime.Now; //subsidies.AddPerson = Session["User"].ToString();//添加人 subsidies.Status = 1; subsidies.Save(); CY.CSTS.Core.Business.FreshNews fresh = new CY.CSTS.Core.Business.FreshNews(); fresh.Sponsor = ""; fresh.FreshEvent = "优惠补贴开始"; fresh.Embracer = ""; fresh.EmbracerId = new Guid(); fresh.UnitId = new Guid(); fresh.EventType = 6; fresh.EventTime = DateTime.Now; Page.RegisterStartupScript("", "<script>window.location.href=\"History.aspx\"</script>"); }