纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
1009 B

using NFine.Code;
using NFine.Data;
using NFine.Domain.Entity.SystemManage;
using NFine.Domain.IRepository.SystemManage;
using NFine.Repository.SystemManage;
namespace NFine.Repository.SystemManage
{
public class CustomerRepository : RepositoryBase<CustomerEntity>, ICustomerRepository
{
public void DeleteForm(string keyValue)
{
using (var db = new RepositoryBase().BeginTrans())
{
db.Delete<CustomerEntity>(t => t.F_Id == keyValue);
db.Commit();
}
}
public void SubmitForm(CustomerEntity cusEntity, string keyValue)
{
using (var db = new RepositoryBase().BeginTrans())
{
if (!string.IsNullOrEmpty(keyValue))
{
db.Update(cusEntity);
}
else
{
db.Insert(cusEntity);
}
db.Commit();
}
}
}
}