33 lines
900 B
C#
33 lines
900 B
C#
using System;
|
|
using WX.CRM.BLL.Base;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Soft;
|
|
using WX.CRM.Model.Entity;
|
|
|
|
namespace WX.CRM.BLL.Soft
|
|
{
|
|
public class SOFT_RESETPWD_BL : ISOFT_RESETPWD
|
|
{
|
|
public bool Add(ref ValidationErrors errors, SOFT_RESETPWD model)
|
|
{
|
|
try
|
|
{
|
|
using (WX.CRM.Model.Entity.crmContext db = new WX.CRM.Model.Entity.crmContext())
|
|
{
|
|
SEQUENCES_BL sequences = new SEQUENCES_BL();
|
|
model.PKID = sequences.Seq_base_get();
|
|
model.CTIME = DateTime.Now;
|
|
db.SOFT_RESETPWD.Add(model);
|
|
db.SaveChanges();
|
|
return true;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
errors.Add(ex.Message);
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|