public int ProcessInsertData(int areaCode, string targetDbName) { try { var sList = new TDictionaryDAL(dbKey: areaCode.ToString()).GetModelList(c => c.sysFlag == 0).ToList(); sList.ForEach(s => { s.areaCode = areaCode; s.areaId = s.ID; }); var dal = new TDictionaryDAL(dbKey: targetDbName); var odal = new TDictionaryDAL(dbKey: areaCode.ToString()); foreach (var s in sList) { dal.Insert(s); s.ID = s.areaId; s.sysFlag = 2; odal.Update(s); } return(sList.Count); } catch { return(-1); } }
public TDictionaryBLL(string dbKey) { this.dal = new TDictionaryDAL(dbKey: dbKey); }
public TDictionaryBLL() { this.dal = new TDictionaryDAL(); }