public void SavePrintSeries(PrintSeries ps) { using (var db = new eTempleDbDB()) { db.Save(ps); } }
public void SaveEmployee(Employee emp) { using (var db = new eTempleDbDB()) { db.Save(emp); } }
public void SaveBatch(Batch batchObj) { using (var db = new eTempleDbDB()) { db.Save(batchObj); } }
public void SaveRole(Role roleObj) { using (var db = new eTempleDbDB()) { db.Save(roleObj); } }
public void SaveServiceType(ServiceType servicetypeObj) { using (var db = new eTempleDbDB()) { db.Save(servicetypeObj); } }
public void SaveDesignation(Designation designationObj) { using (var db = new eTempleDbDB()) { db.Save(designationObj); } }
public void SaveStockDetail(StockDetail stObj) { using (var db = new eTempleDbDB()) { db.Save(stObj); } }
public void SavePattiOut(PattiOut poObj) { using (var db = new eTempleDbDB()) { db.Save(poObj); } }
public void SavePattiIn(PattiIn piObj) { using (var db = new eTempleDbDB()) { db.Save(piObj); } }
public int Save(Devotee devotee) { using (var db = new eTempleDbDB()) { db.Save(devotee); return devotee.Id; } }
public int SavePrintSeries(Service ps) { using (var db = new eTempleDbDB()) { db.Save(ps); return(ps.Id); } }
public int Save(Devotee devotee) { using (var db = new eTempleDbDB()) { db.Save(devotee); return(devotee.Id); } }
public long SaveToken(Token ps) { using (var db = new eTempleDbDB()) { db.Save(ps); return(ps.Id); } }
public int SaveVIPPrasadam(VIPPrasadam vObj) { var savedTokens = new List<VIPPrasadam>(); using (var db = new eTempleDbDB()) { db.Save(vObj); return vObj.Id; } }
public int SaveVIPPrasadam(VIPPrasadam vObj) { var savedTokens = new List <VIPPrasadam>(); using (var db = new eTempleDbDB()) { db.Save(vObj); return(vObj.Id); } }
public List <Token> ProcessTokens(List <Token> tokens, List <Devotee> devotees) { var savedTokens = new List <Token>(); using (var db = new eTempleDbDB()) { int tokenCounter = 0; foreach (var t in tokens) { for (int i = 0; i < t.Quantity; i++) { var newToken = new Token(); newToken.ServiceId = t.ServiceId; newToken.Quantity = 1; // we always create a new record for each ticket. newToken.TotalCost = t.TotalCost / t.Quantity; if (devotees.Count > tokenCounter) { var tokenDevotee = devotees[tokenCounter]; if (tokenDevotee.Id == 0) { // use the first devotee if other devotee details are not mentioned. tokenDevotee = devotees.FirstOrDefault(d => d.Id != 0); } if (tokenDevotee != null) { newToken.DevoteeId = tokenDevotee.Id; } } newToken.CreatedBy = t.CreatedBy; newToken.CreatedOn = t.CreatedOn; db.Save(newToken); newToken = db.FirstOrDefault <Token>(@"select t.*, s.Name as ServiceName, s.Type as ServiceTypeID, s.Type as ServiceType, d.DevoteeName, d.Gothram, D.AdditionalNames, d.AdditionalGothrams, p.Name as PrefixName from Tokens t join Services s on (t.ServiceId = s.Id) left outer join Devotees d on (t.DevoteeId = d.Id) left outer join Prefixes p on (d.Prefix = p.Id) where t.Id = @0", newToken.Id); savedTokens.Add(newToken); tokenCounter++; } } } return(savedTokens); }
public int SavePrintSeries(Service ps) { using (var db = new eTempleDbDB()) { db.Save(ps); return ps.Id; } }
public void Add(ServiceName entity) { TempleDb.Save(entity); }
public long SaveToken(Token ps) { using (var db = new eTempleDbDB()) { db.Save(ps); return ps.Id; } }
public List<Token> ProcessTokens(List<Token> tokens, List<Devotee> devotees) { var savedTokens = new List<Token>(); using (var db = new eTempleDbDB()) { int tokenCounter = 0; foreach (var t in tokens) { for (int i = 0; i < t.Quantity; i++) { var newToken = new Token(); newToken.ServiceId = t.ServiceId; newToken.Quantity = 1; // we always create a new record for each ticket. newToken.TotalCost = t.TotalCost / t.Quantity; if (devotees.Count > tokenCounter) { var tokenDevotee = devotees[tokenCounter]; if (tokenDevotee.Id == 0) { // use the first devotee if other devotee details are not mentioned. tokenDevotee = devotees.FirstOrDefault(d => d.Id != 0); } if (tokenDevotee != null) { newToken.DevoteeId = tokenDevotee.Id; } } newToken.CreatedBy = t.CreatedBy; newToken.CreatedOn = t.CreatedOn; db.Save(newToken); newToken = db.FirstOrDefault<Token>(@"select t.*, s.Name as ServiceName, s.Type as ServiceTypeID, s.Type as ServiceType, d.DevoteeName, d.Gothram, D.AdditionalNames, d.AdditionalGothrams, p.Name as PrefixName from Tokens t join Services s on (t.ServiceId = s.Id) left outer join Devotees d on (t.DevoteeId = d.Id) left outer join Prefixes p on (d.Prefix = p.Id) where t.Id = @0", newToken.Id); savedTokens.Add(newToken); tokenCounter++; } } } return savedTokens; }
public void Add(ServiceTypes entity) { TempleDb.Save(entity); }