public static Common.Models.Billing.Fee Create( Transaction t, Common.Models.Billing.Fee model, Common.Models.Account.Users creator) { return(Create(model, creator, t.Connection, false)); }
public static Common.Models.Billing.Fee Edit( Transaction t, Common.Models.Billing.Fee model, Common.Models.Account.Users modifier) { return(Edit(model, modifier, t.Connection, false)); }
public static Common.Models.Billing.FeeMatter RelateMatter( Transaction t, Common.Models.Billing.Fee model, Guid matterId, Common.Models.Account.Users creator) { return(RelateMatter(model, matterId, creator, t.Connection, false)); }
public static Common.Models.Billing.FeeMatter RelateMatter(Common.Models.Billing.Fee model, Guid matterId, Common.Models.Account.Users creator) { return(FeeMatter.Create(new Common.Models.Billing.FeeMatter() { Id = Guid.NewGuid(), Fee = model, Matter = new Common.Models.Matters.Matter() { Id = matterId }, CreatedBy = creator, ModifiedBy = creator, Created = DateTime.UtcNow, Modified = DateTime.UtcNow }, creator)); }
public static Common.Models.Billing.Fee Edit(Common.Models.Billing.Fee model, Common.Models.Account.Users modifier) { model.ModifiedBy = modifier; model.Modified = DateTime.UtcNow; DBOs.Billing.Fee dbo = Mapper.Map <DBOs.Billing.Fee>(model); using (IDbConnection conn = Database.Instance.GetConnection()) { conn.Execute("UPDATE \"fee\" SET " + "\"incurred\"=@Incurred, \"amount\"=@Amount, \"details\"=@Details, " + "\"utc_modified\"=@UtcModified, \"modified_by_user_pid\"=@ModifiedByUserPId " + "WHERE \"id\"=@Id", dbo); } return(model); }
public static Common.Models.Billing.Fee Create(Common.Models.Billing.Fee model, Common.Models.Account.Users creator) { if (!model.Id.HasValue) { model.Id = Guid.NewGuid(); } model.CreatedBy = model.ModifiedBy = creator; model.Created = model.Modified = DateTime.UtcNow; DBOs.Billing.Fee dbo = Mapper.Map <DBOs.Billing.Fee>(model); using (IDbConnection conn = Database.Instance.GetConnection()) { conn.Execute("INSERT INTO \"fee\" (\"id\", \"incurred\", \"amount\", \"details\", \"utc_created\", \"utc_modified\", \"created_by_user_pid\", \"modified_by_user_pid\") " + "VALUES (@Id, @Incurred, @Amount, @Details, @UtcCreated, @UtcModified, @CreatedByUserPId, @ModifiedByUserPId)", dbo); } return(model); }
public static Common.Models.Billing.FeeMatter RelateMatter( Common.Models.Billing.Fee model, Guid matterId, Common.Models.Account.Users creator, IDbConnection conn = null, bool closeConnection = true) { return(FeeMatter.Create(new Common.Models.Billing.FeeMatter() { Id = Guid.NewGuid(), Fee = model, Matter = new Common.Models.Matters.Matter() { Id = matterId }, CreatedBy = creator, ModifiedBy = creator, Created = DateTime.UtcNow, Modified = DateTime.UtcNow }, creator, conn, closeConnection)); }
public static Common.Models.Billing.Fee Edit( Common.Models.Billing.Fee model, Common.Models.Account.Users modifier, IDbConnection conn = null, bool closeConnection = true) { model.ModifiedBy = modifier; model.Modified = DateTime.UtcNow; DBOs.Billing.Fee dbo = Mapper.Map <DBOs.Billing.Fee>(model); conn = DataHelper.OpenIfNeeded(conn); conn.Execute("UPDATE \"fee\" SET " + "\"incurred\"=@Incurred, \"amount\"=@Amount, \"details\"=@Details, " + "\"utc_modified\"=@UtcModified, \"modified_by_user_pid\"=@ModifiedByUserPId " + "WHERE \"id\"=@Id", dbo); DataHelper.Close(conn, closeConnection); return(model); }
public static Common.Models.Billing.Fee Create( Common.Models.Billing.Fee model, Common.Models.Account.Users creator, IDbConnection conn = null, bool closeConnection = true) { if (!model.Id.HasValue) { model.Id = Guid.NewGuid(); } model.CreatedBy = model.ModifiedBy = creator; model.Created = model.Modified = DateTime.UtcNow; DBOs.Billing.Fee dbo = Mapper.Map <DBOs.Billing.Fee>(model); conn = DataHelper.OpenIfNeeded(conn); conn.Execute("INSERT INTO \"fee\" (\"id\", \"incurred\", \"amount\", \"details\", \"utc_created\", \"utc_modified\", \"created_by_user_pid\", \"modified_by_user_pid\") " + "VALUES (@Id, @Incurred, @Amount, @Details, @UtcCreated, @UtcModified, @CreatedByUserPId, @ModifiedByUserPId)", dbo); DataHelper.Close(conn, closeConnection); return(model); }