public int AddSFormulaidSet(SFormulaidSet sformulaidSet) { using (DbConnection conn = new DbConnection()) { return(sformulaidSet.Save()); } }
public bool UpdateSFormulaidSet(SFormulaidSet sformulaidSet) { using (DbConnection conn = new DbConnection()) { if (sformulaidSet.Save() > 0) { return(true); } return(false); } }
public bool Update(SFormulaidSet sFormulaidSet) { var bll = new SFormulaidSetBll(); if (bll.Update(sFormulaidSet)) { formulaidSetDic.formulaidSets[(int)sFormulaidSet.FormulaidSetId] = sFormulaidSet; return(true); } return(false); }
public int Add(SFormulaidSet sformulaidSet) { var bll = new SFormulaidSetBll(); int id = bll.Add(sformulaidSet); if (id > 0) { sformulaidSet.FormulaidSetId = id; this.formulaidSets.Add(id, sformulaidSet); return(id); } return(-1); }
public bool Delete(int id) { using (DbConnection conn = new DbConnection()) { try { SFormulaidSet.Delete(Where.Equal("FORMULAID_SET_ID", id)); return(true); } catch (Exception) { return(false); } } }
public int CheckAdd(SFormulaidSet sformulaidSet) { bool flag = false; foreach (var set in formulaidSets) { if (set.Value.FormulaidId == sformulaidSet.FormulaidId && set.Value.ParaCount == sformulaidSet.ParaCount && set.Value.Parameter1 == sformulaidSet.Parameter1 && set.Value.Parameter2 == sformulaidSet.Parameter2 && set.Value.Parameter3 == sformulaidSet.Parameter3 && set.Value.Parameter4 == sformulaidSet.Parameter4 && set.Value.Parameter5 == sformulaidSet.Parameter5 && set.Value.Parameter6 == sformulaidSet.Parameter6 && set.Value.Parameter7 == sformulaidSet.Parameter7 && set.Value.Parameter8 == sformulaidSet.Parameter8 && set.Value.ParaNameId1 == sformulaidSet.ParaNameId1 && set.Value.ParaNameId2 == sformulaidSet.ParaNameId2 && set.Value.ParaNameId3 == sformulaidSet.ParaNameId3 && set.Value.ParaNameId4 == sformulaidSet.ParaNameId4 && set.Value.ParaNameId5 == sformulaidSet.ParaNameId5 && set.Value.ParaNameId6 == sformulaidSet.ParaNameId6 ) { flag = true; } } if (!flag) { var bll = new SFormulaidSetBll(); int id = bll.Add(sformulaidSet); if (id > 0) { sformulaidSet.FormulaidSetId = id; this.formulaidSets.Add(id, sformulaidSet); return(id); } } return(-1); }
public bool Update(SFormulaidSet sFormulaidSet) { return(Dal.UpdateSFormulaidSet(sFormulaidSet)); }
public int Add(SFormulaidSet sFormulaidSet) { return(Dal.AddSFormulaidSet(sFormulaidSet)); }