Exemplo n.º 1
0
 public void SavePrintSeries(PrintSeries ps)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(ps);
     }
 }
Exemplo n.º 2
0
 public void SaveEmployee(Employee emp)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(emp);
     }
 }
Exemplo n.º 3
0
 public void SaveBatch(Batch batchObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(batchObj);
     }
 }
Exemplo n.º 4
0
 public void SaveRole(Role roleObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(roleObj);
     }
 }
Exemplo n.º 5
0
 public void SaveBatch(Batch batchObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(batchObj);
     }
 }
Exemplo n.º 6
0
 public void SaveServiceType(ServiceType servicetypeObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(servicetypeObj);
     }
 }
Exemplo n.º 7
0
 public void SaveRole(Role roleObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(roleObj);
     }
 }
 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);
     }
 }
Exemplo n.º 10
0
 public void SaveDesignation(Designation designationObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(designationObj);
     }
 }
Exemplo n.º 11
0
 public void SavePattiOut(PattiOut poObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(poObj);
     }
 }
Exemplo n.º 12
0
 public void SavePattiIn(PattiIn piObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(piObj);
     }
 }
Exemplo n.º 13
0
 public void SaveServiceType(ServiceType servicetypeObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(servicetypeObj);
     }
 }
Exemplo n.º 14
0
 public void SaveEmployee(Employee emp)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(emp);
     }
 }
Exemplo n.º 15
0
 public void SavePattiOut(PattiOut poObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(poObj);
     }
 }
Exemplo n.º 16
0
 public void SaveStockDetail(StockDetail stObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(stObj);
     }
 }
Exemplo n.º 17
0
 public void SavePattiIn(PattiIn piObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(piObj);
     }
 }
Exemplo n.º 18
0
 public int Save(Devotee devotee)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(devotee);
         return devotee.Id;
     }
 }
Exemplo n.º 19
0
 public int SavePrintSeries(Service ps)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(ps);
         return(ps.Id);
     }
 }
Exemplo n.º 20
0
 public int Save(Devotee devotee)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(devotee);
         return(devotee.Id);
     }
 }
Exemplo n.º 21
0
 public long SaveToken(Token ps)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(ps);
         return(ps.Id);
     }
 }
Exemplo n.º 22
0
 public int SaveVIPPrasadam(VIPPrasadam vObj)
 {
     var savedTokens = new List<VIPPrasadam>();
     using (var db = new eTempleDbDB())
     {
         db.Save(vObj);
         return vObj.Id;
     }
 }
Exemplo n.º 23
0
        public int SaveVIPPrasadam(VIPPrasadam vObj)
        {
            var savedTokens = new List <VIPPrasadam>();

            using (var db = new eTempleDbDB())
            {
                db.Save(vObj);
                return(vObj.Id);
            }
        }
Exemplo n.º 24
0
        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);
        }
Exemplo n.º 25
0
 public int SavePrintSeries(Service ps)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(ps);
         return ps.Id;
     }
 }
Exemplo n.º 26
0
 public void Add(ServiceName entity)
 {
     TempleDb.Save(entity);
 }
Exemplo n.º 27
0
 public long SaveToken(Token ps)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(ps);
         return ps.Id;
     }
 }
Exemplo n.º 28
0
        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;
        }
Exemplo n.º 29
0
 public void SavePrintSeries(PrintSeries ps)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(ps);
     }
 }
Exemplo n.º 30
0
 public void Add(ServiceTypes entity)
 {
     TempleDb.Save(entity);
 }