protected void rplist_OnItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "bj") { Response.Redirect("ProjectEdit.aspx?ID=" + e.CommandArgument); } if (e.CommandName == "sc") { int id = int.Parse(e.CommandArgument.ToString()); var newsmodel = bp.GetProjectsByID(id); if (bp.Delete(newsmodel) == 1) { //// 插入日志 delete SysOperateLog log = new SysOperateLog(); log.LogID = StringHelper.getKey(); log.LogType = LogType.项目信息.ToString(); log.OperateUser = GetLogUserName(); log.OperateDate = DateTime.Now; log.LogOperateType = "删除项目"; log.LogBeforeObject = JsonHelper.Obj2Json(newsmodel); bsol.Insert(log); Message.ShowOK(this, "删除项目成功!"); } else { Message.ShowWrong(this, "删除项目失败"); } } BindingList(); }
private void BindDetail() { Project p = bp.GetProjectsByID(Utils.StrToInt(id, 0)); ltProjectTitle.Text = p.ProjectName; lttime.Text = string.Format(p.StartTime.ToString(), "yyyy-MM-dd") + "~" + string.Format(p.EndTime.ToString(), "yyyy-MM-dd"); ltorg.Text = p.OrgName; ltcontent.Text = p.ProjectContent; ltstage.Text = p.ProjectStage; ltPeriod.Text = p.ProjectPeriod; }
private void BindDetail() { Project p = bp.GetProjectsByID(Utils.StrToInt(hfProjectID.Value, 0)); txtName.Text = p.ProjectName; txtOrgName.Text = p.OrgName; txtContent.Text = p.ProjectContent; StarTime.Text = p.StartTime.ToString(); EndTime.Text = p.EndTime.ToString(); DpProjectPeriod.SelectedValue = p.ProjectPeriod; string str = p.ProjectStage; str = str.Replace("<", "<"); str = str.Replace(">", ">"); str = str.Replace(" ", " "); str = str.Replace("<br>", "\r\n"); txtProjectStage.Text = str; if (p.ExpertID != null || p.ExpertID != 0) { dpExpert.SelectedValue = p.ExpertID.ToString(); } if (p.LmMemberID != null || p.LmMemberID != 0) { dpLm.SelectedValue = p.LmMemberID.ToString(); } if (p.TdMemberID != null || p.TdMemberID != 0) { dpTd.SelectedValue = p.TdMemberID.ToString(); } if (p.StuMemberID != null || p.StuMemberID != 0) { dpstu.SelectedValue = p.StuMemberID.ToString(); } }