protected void lnk_Delete_Click(object sender, System.EventArgs e) { if (!base.IsAuthorizedOp(ActionType.Delete.ToString())) { base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền"); } else { int @int = WebUtils.GetInt((sender as LinkButton).CommandArgument); GatheringRecInfo dataById = SinGooCMS.BLL.GatheringRec.GetDataById(@int); if (dataById == null) { base.ShowAjaxMsg(this.UpdatePanel1, "Những thông tin này không được tìm thấy, các dữ liệu không tồn tại hoặc đã bị xóa"); } else if (SinGooCMS.BLL.GatheringRec.Delete(@int)) { this.BindData(); PageBase.log.AddEvent(base.LoginAccount.AccountName, "删除订单[" + dataById.OrderNo + "]的收款单成功"); base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thành công"); } else { base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thất bại"); } } }
public static int Add(GatheringRecInfo entity) { int result; if (entity == null) { result = 0; } else { result = BizBase.dbo.InsertModel <GatheringRecInfo>(entity); } return(result); }
public static bool Update(GatheringRecInfo entity) { return(entity != null && BizBase.dbo.UpdateModel <GatheringRecInfo>(entity)); }