Esempio n. 1
0
 private object[] Take(ShelfLocationModel model)
 {
     return(new object[]
     {
         "@Id", model.LocationId,
         "@LevelNo", model.LevelNo,
         "@ColumnNo", model.ColumnNo,
         "@CombindLocation", model.CombindLocation,
         "@ItemId", model.ItemId,
         "@TaskId", model.TaskId,
         "@ReserveFlag", model.ReserveFlag,
         "@FillFlag", model.FillFlag,
         "@AvailableFlag", model.AvailableFlag,
         "@CreatedBy", model.CreatedBy,
         "@CreationDate", model.CreationDate,
         "@LastUpdatedBy", model.LastUpdatedBy,
         "@LastUpdateDate", model.LastUpdateDate,
         "@attribute1", model.Attribute1,
         "@attribute2", model.Attribute2,
         "@attribute3", model.Attribute3,
         "@attribute4", model.Attribute4,
         "@attribute5", model.Attribute5,
         "@Priority", model.Priority
     });
 }
Esempio n. 2
0
        public void Delete(ShelfLocationModel model)
        {
            string sql = @"DELETE FROM ShelfLocations WHERE Id = @Id";

            object[] parms = { "@Id", model.LocationId };
            db.Update(sql, parms);
        }
Esempio n. 3
0
        public void Update(ShelfLocationModel model)
        {
            string sql =
                @"UPDATE ShelfLocations
                   SET LevelNo = @LevelNo
                      ,ColumnNo = @ColumnNo
                      ,CombindLocation = @CombindLocation
                      ,ItemId = @ItemId
                      ,TaskId = @TaskId
                      ,ReserveFlag = @ReserveFlag
                      ,FillFlag = @FillFlag
                      ,AvailableFlag = @AvailableFlag
                      ,CreatedBy = @CreatedBy
                      ,CreationDate = @CreationDate
                      ,LastUpdatedBy = @LastUpdatedBy
                      ,LastUpdateDate = @LastUpdateDate
                      ,attribute1 = @attribute1
                      ,attribute2 = @attribute2
                      ,attribute3 = @attribute3
                      ,attribute4 = @attribute4
                      ,attribute5 = @attribute5
                      ,Priority = @Priority
                 WHERE Id = @Id";

            db.Update(sql, Take(model));
        }
Esempio n. 4
0
        public int Insert(ShelfLocationModel model)
        {
            string sql =
                @"INSERT INTO ShelfLocations
                       (LevelNo
                       ,ColumnNo
                       ,CombindLocation
                       ,ItemId
                       ,TaskId
                       ,ReserveFlag
                       ,FillFlag
                       ,AvailableFlag
                       ,CreatedBy
                       ,CreationDate
                       ,LastUpdatedBy
                       ,LastUpdateDate
                       ,attribute1
                       ,attribute2
                       ,attribute3
                       ,attribute4
                       ,attribute5
                       ,Priority)
                 VALUES
                       (@LevelNo
                       ,@ColumnNo
                       ,@CombindLocation
                       ,@ItemId
                       ,@TaskId
                       ,@ReserveFlag
                       ,@FillFlag
                       ,@AvailableFlag
                       ,@CreatedBy
                       ,@CreationDate
                       ,@LastUpdatedBy
                       ,@LastUpdateDate
                       ,@attribute1
                       ,@attribute2
                       ,@attribute3
                       ,@attribute4
                       ,@attribute5
                       ,@Priority)";

            return(db.Insert(sql, Take(model)));
        }
 public void DeleteLocation(ShelfLocationModel model)
 {
     factory.ShelfLocationDao.Delete(model);
 }
 public void UpdateLocation(ShelfLocationModel model)
 {
     model.LastUpdateDate = DateTime.Now;
     factory.ShelfLocationDao.Update(model);
 }
 public int InsertLocation(ShelfLocationModel model)
 {
     model.CreationDate   = DateTime.Now;
     model.LastUpdateDate = DateTime.Now;
     return(factory.ShelfLocationDao.Insert(model));
 }