public int ProcessInsertData(int areaCode, string targetDbName) { try { var sList = new TLineUpMaxNoDAL(dbKey: areaCode.ToString()).GetModelList(c => c.sysFlag == 0).ToList(); sList.ForEach(s => { s.areaCode = areaCode; s.areaId = s.id; }); var dal = new TLineUpMaxNoDAL(dbKey: targetDbName); var odal = new TLineUpMaxNoDAL(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 TLineUpMaxNoBLL(string dbKey) { this.dal = new TLineUpMaxNoDAL(dbKey: dbKey); }
public TLineUpMaxNoBLL() { this.dal = new TLineUpMaxNoDAL(); }