protected void btnDelete_Click(object sender, EventArgs e) { BLL.tb_JC_Procedure bllProcedure = new BLL.tb_JC_Procedure(); string id = gridProcedure.DataKeys[gridProcedure.SelectedRowIndex][0].ToString(); Model.tb_JC_Procedure modelProcedure = bllProcedure.GetModel(id); modelProcedure.Status = "N"; bool result = bllProcedure.Update(modelProcedure); if (result) { Alert.ShowInTop("删除成功", "信息", MessageBoxIcon.Information); BindGrid(); } else { Alert.ShowInTop("删除失败", "错误", MessageBoxIcon.Error); } }
protected void btnSave_Click(object sender, EventArgs e) { #region 检查 #endregion #region 保存 Model.tb_JC_Procedure modelProcedure = new Model.tb_JC_Procedure(); modelProcedure.ID = Request.QueryString["ID"].ToString(); modelProcedure.ProcedureNO = txbProcedureNO.Text; modelProcedure.ProcedureName = txbProcedureName.Text; modelProcedure.WorkCenterNO = hdfWorkCenterNO.Text; modelProcedure.Status = "Y"; BLL.tb_JC_Procedure bllProcedure = new BLL.tb_JC_Procedure(); bool result = bllProcedure.Update(modelProcedure); if (result) { Alert.ShowInTop("更新成功!", "信息", MessageBoxIcon.Information, ActiveWindow.GetHidePostBackReference("Main_Modify_Success")); } else { Alert.ShowInTop("更新失败!", "错误", MessageBoxIcon.Error, ActiveWindow.GetHidePostBackReference("Main_Modify_Fail")); } #endregion }