//绑定数据 private void BindData(int ID) { LabMS.BLL.PositionLog pLog = new LabMS.BLL.PositionLog(); LabMS.Model.PositionLog pLogInfo = new LabMS.Model.PositionLog(); pLogInfo = pLog.GetModel(ID); PLogTeacherName.Text = pLogInfo.PLog_TeacherName; PLogTime.Text = pLogInfo.PLog_Time.Value.ToShortDateString(); PLogEquipment.Text = pLogInfo.PLog_Equipment; PLogLabIntro.Text = pLogInfo.PLog_LabIntro; PLogOther.Text = pLogInfo.PLog_Other; }
//删除 protected void Delete_OnClick(object sender, EventArgs e) { LabMS.BLL.PositionLog positionlog = new LabMS.BLL.PositionLog(); try { positionlog.Delete(ID); LabMS.Common.JShelper.JSAlertAndRedirect(Page, "deleteSuccess", "删除成功!", "ListPositionLog.aspx"); } catch { LabMS.Common.JShelper.JSAlert(Page, "err", "删除失败!"); } }