/// <summary> /// 修改 /// </summary> public override void EntityUpdate() { PaymentHandleRule rule = new PaymentHandleRule(); PaymentHandle entity = EntityGet(); rule.RUpdate(entity); }
public override void btnLoad_Click(object sender, EventArgs e) { if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.权限0)) { this.ShowMessage("没有此权限,请联系管理员"); return; } ButtonItem btn = (ButtonItem)sender; PaymentHandleRule rule = new PaymentHandleRule(); PaymentHandle entity = new PaymentHandle(); entity.ID = HTDataID; entity.SelectByID(); if (btn.Text == "撤销已阅") { if (entity.ReadFlag == 0) { this.ShowMessage("该单据还未阅,无需撤销"); return; } entity.ReadFlag = 0; rule.RUpdate(entity); } if (btn.Text == "已阅") { if (entity.ReadFlag == 1) { this.ShowMessage("该单据已阅,无需再阅"); return; } entity.ReadFlag = 1; rule.RUpdate(entity); } btnQuery_Click(null, null); ProcessGrid.GridViewFocus(gridView1, new string[] { "ID" }, new string[] { entity.ID.ToString() }); }